Ticket #943: django-admin.diff

File django-admin.diff, 846 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)
     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)
    8992        ACTION_MAPPING[action](username, email, password)
    9093    elif action in ('init', 'validate'):
    9194        ACTION_MAPPING[action]()
Back to Top