bug fix: reenable the -d option
svn: r12722
This commit is contained in:
parent
d69bb96fe9
commit
db5458a507
@ -173,6 +173,7 @@ class ArgParser(object):
|
||||
return
|
||||
|
||||
# Go over all given option and place them into appropriate lists
|
||||
cleandbg = []
|
||||
for opt_ix in range(len(options)):
|
||||
option, value = options[opt_ix]
|
||||
if option in ( '-O', '--open'):
|
||||
@ -200,8 +201,10 @@ class ArgParser(object):
|
||||
options_str = options[opt_ix+1][1]
|
||||
self.actions.append((action, options_str))
|
||||
elif option in ('-d', '--debug'):
|
||||
print 'setup debugging', value
|
||||
logger = logging.getLogger(value)
|
||||
logger.setLevel(logging.DEBUG)
|
||||
cleandbg += [opt_ix]
|
||||
elif option in ('-l',):
|
||||
self.list = True
|
||||
elif option in ('-L',):
|
||||
@ -211,6 +214,11 @@ class ArgParser(object):
|
||||
elif option in ('-u', '--force-unlock'):
|
||||
self.force_unlock = True
|
||||
|
||||
#clean options list
|
||||
cleandbg.reverse()
|
||||
for ind in cleandbg:
|
||||
del options[ind]
|
||||
|
||||
if len(options) > 0 and self.open is None and self.imports == [] \
|
||||
and not (self.list or self.list_more or self.help):
|
||||
self.errors += [(_('Error parsing the arguments'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user