diff options
Diffstat (limited to 'django/core/management/__init__.py')
| -rw-r--r-- | django/core/management/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/django/core/management/__init__.py b/django/core/management/__init__.py index 32e744374a..85bf324fdc 100644 --- a/django/core/management/__init__.py +++ b/django/core/management/__init__.py @@ -250,15 +250,15 @@ class ManagementUtility(object): """ try: app_name = get_commands()[subcommand] - if isinstance(app_name, BaseCommand): - # If the command is already loaded, use it directly. - klass = app_name - else: - klass = load_command_class(app_name, subcommand) except KeyError: sys.stderr.write("Unknown command: %r\nType '%s help' for usage.\n" % \ (subcommand, self.prog_name)) sys.exit(1) + if isinstance(app_name, BaseCommand): + # If the command is already loaded, use it directly. + klass = app_name + else: + klass = load_command_class(app_name, subcommand) return klass def autocomplete(self): |
