Thanks craftyguy!
Probably meant to call 'globals()' and not 'locals()'. As @MartijnBraam
pointed out in IRC, probably best to have these functions in a separate
module so they can be parsed with getattr
This commit is contained in:
clayton craft 2017-07-17 11:41:39 -07:00 committed by Oliver Smith
parent a502b50475
commit fc3e4bfe4a
1 changed files with 1 additions and 2 deletions

View File

@ -137,12 +137,11 @@ def main():
return 1
# If an action_xxx function is defined in local scope, run it with args
func = locals().get('action_' + args.action)
func = globals().get('action_' + args.action)
if func:
func(args)
else:
logging.info("Run pmbootstrap -h for usage information.")
# Print finish timestamp
logging.info("Done")