Skip to content

Commit

Permalink
Use input from django.utils.six.moves, remove cms.utils.compat.input …
Browse files Browse the repository at this point in the history
…module
  • Loading branch information
Mateusz Marzantowicz committed Jul 8, 2014
1 parent 9bca1e2 commit b843d4f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.core.management.base import NoArgsCommand
from django.utils.six.moves import input

from cms.management.commands.subcommands.list import plugin_report
from cms.utils.compat.input import raw_input


class DeleteOrphanedPluginsCommand(NoArgsCommand):
Expand Down Expand Up @@ -28,7 +29,7 @@ def handle_noargs(self, **options):
unsaved_instances.append(instance)

if options.get('interactive'):
confirm = raw_input("""
confirm = input("""
You have requested to delete any instances of uninstalled plugins and unsaved plugin instances.
There are %d uninstalled plugins and %d unsaved_plugins.
Are you sure you want to do this?
Expand Down
8 changes: 4 additions & 4 deletions cms/management/commands/subcommands/uninstall.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
from cms.plugin_pool import plugin_pool
from django.core.management.base import LabelCommand
from django.utils.six.moves import input

from cms.management.commands.subcommands.base import SubcommandsCommand
from cms.models import Page
from cms.models.pluginmodel import CMSPlugin
from cms.utils.compat.input import raw_input
from cms.plugin_pool import plugin_pool


class UninstallApphooksCommand(LabelCommand):
Expand All @@ -19,7 +19,7 @@ def handle_label(self, label, **options):

if number_of_apphooks > 0:
if options.get('interactive'):
confirm = raw_input("""
confirm = input("""
You have requested to remove %d %r apphooks.
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: """ % (number_of_apphooks, label))
Expand All @@ -44,7 +44,7 @@ def handle_label(self, label, **options):

if number_of_plugins > 0:
if options.get('interactive'):
confirm = raw_input("""
confirm = input("""
You have requested to remove %d %r plugins.
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: """ % (number_of_plugins, label))
Expand Down
4 changes: 0 additions & 4 deletions cms/utils/compat/input.py

This file was deleted.

0 comments on commit b843d4f

Please sign in to comment.