Ticket #943: django-admin.2.diff

File django-admin.2.diff, 957 bytes (added by deric <deric@…>, 19 years ago)
  • django-admin.py

     
    8484        try:
    8585            username, email, password = args[1], args[2], args[3]
    8686        except IndexError:
    87             sys.stderr.write("Error: %r requires arguments of 'username email password' or no argument at all.\n")
    88             sys.exit(1)
    89         ACTION_MAPPING[action](username, email, password)
     87            if len(args) == 1: # we got no arguments only the action
     88                ACTION_MAPPING[action]()
     89            else:
     90                sys.stderr.write("Error: %r requires arguments of 'username email password' or no argument at all.\n")
     91                sys.exit(1)
     92        else:
     93            ACTION_MAPPING[action](username, email, password)
    9094    elif action in ('init', 'validate'):
    9195        ACTION_MAPPING[action]()
    9296    elif action == 'inspectdb':
Back to Top