mirror of https://github.com/vitalif/phantomjs
Move debug setter down so it can be changed in ParseArgs hook
Reload verbose flag if ParseArgs hook changed the flag Added args as an arg to ParseArgs hook1.4
parent
04909e30e4
commit
f39c3d4be8
|
@ -97,13 +97,6 @@ def parseArgs(app, args):
|
|||
for setting in config.settings:
|
||||
setattr(args, config.settings[setting]['mapping'], config.property(setting))
|
||||
|
||||
# special case for verbose arg, which will need to be re-applied
|
||||
if setting == 'verbose':
|
||||
messageHandler.verbose = args.verbose
|
||||
|
||||
if args.debug:
|
||||
debug(args.debug)
|
||||
|
||||
split_check = (
|
||||
(args.proxy, 'proxy'),
|
||||
(args.auth, 'auth')
|
||||
|
@ -116,7 +109,14 @@ def parseArgs(app, args):
|
|||
sys.exit(1)
|
||||
setattr(args, name, item)
|
||||
|
||||
do_action('ParseArgs')
|
||||
do_action('ParseArgs', args)
|
||||
|
||||
if args.debug:
|
||||
debug(args.debug)
|
||||
|
||||
# verbose flag got changed on us, so we reload the flag
|
||||
if messageHandler.verbose != args.verbose:
|
||||
messageHandler.verbose = args.verbose
|
||||
|
||||
if args.script is None:
|
||||
p.print_help()
|
||||
|
|
Loading…
Reference in New Issue