#15359: django-admin.py: -h option usage inconsistent with help output
-----------------------------+----------------------------------------------
Reporter: teubank | Owner: nobody
Status: new | Milestone: 1.4
Component: django-admin.py | Version: 1.2
Keywords: | Triage Stage: Unreviewed
Has patch: 1 |
-----------------------------+----------------------------------------------
The help text for django-admin.py shows `-h` as a valid option, but using
`-h` produces an error message. (This discrepancy is admittedly a very
minor, but unnecessary, bug.)
To reproduce:
{{{
$ django-admin -h
Unknown command: '-h'
Type 'django-admin help' for usage.
$ django-admin help
...
-h, --help show this help message and exit
...
}}}
The attached patches for releases 1.1.X and 1.2.X modify
`django/trunk/django/core/management/__init__.py` to accept `-h` as a
valid option.
{{{
- elif self.argv[1:] == ['--help']:
+ elif self.argv[1:] == ['--help'] or self.argv[1:] == ['-h']:
}}}
Note: Since the definition for the `help` option is buried in optparse.py,
modifying `django/core/management/__init__.py` to accept `-h` seems to be
preferable to changing the `help` option definition to reflect current
usage.
--
Ticket URL: <http://code.djangoproject.com/ticket/15359>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.