mirror of https://github.com/django/django.git
Clean up of the command line argument error processing from [6400].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6401 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
302eeaf190
commit
626a341587
|
@ -122,7 +122,7 @@ class LaxOptionParser(OptionParser):
|
||||||
the commands (and thus the options) that are available to the user.
|
the commands (and thus the options) that are available to the user.
|
||||||
"""
|
"""
|
||||||
def error(self, msg):
|
def error(self, msg):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
class ManagementUtility(object):
|
class ManagementUtility(object):
|
||||||
"""
|
"""
|
||||||
|
@ -175,8 +175,11 @@ class ManagementUtility(object):
|
||||||
# early
|
# early
|
||||||
parser = LaxOptionParser(version=get_version(),
|
parser = LaxOptionParser(version=get_version(),
|
||||||
option_list=BaseCommand.option_list)
|
option_list=BaseCommand.option_list)
|
||||||
options, args = parser.parse_args(self.argv)
|
try:
|
||||||
handle_default_options(options)
|
options, args = parser.parse_args(self.argv)
|
||||||
|
handle_default_options(options)
|
||||||
|
except:
|
||||||
|
pass # Ignore any option errors at this point.
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subcommand = self.argv[1]
|
subcommand = self.argv[1]
|
||||||
|
|
Loading…
Reference in New Issue