~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to django/core/management/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-10-12 11:34:35 UTC
  • mfrom: (1.2.7 upstream)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: james.westby@ubuntu.com-20101012113435-9lnsrh0i3mxozbt0
Tags: upstream-1.2.3
ImportĀ upstreamĀ versionĀ 1.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
        """
251
251
        try:
252
252
            app_name = get_commands()[subcommand]
253
 
            if isinstance(app_name, BaseCommand):
254
 
                # If the command is already loaded, use it directly.
255
 
                klass = app_name
256
 
            else:
257
 
                klass = load_command_class(app_name, subcommand)
258
253
        except KeyError:
259
254
            sys.stderr.write("Unknown command: %r\nType '%s help' for usage.\n" % \
260
255
                (subcommand, self.prog_name))
261
256
            sys.exit(1)
 
257
        if isinstance(app_name, BaseCommand):
 
258
            # If the command is already loaded, use it directly.
 
259
            klass = app_name
 
260
        else:
 
261
            klass = load_command_class(app_name, subcommand)
262
262
        return klass
263
263
 
264
264
    def autocomplete(self):