From fc3e4bfe4a0c7c363abb67624f38286b3c118b6b Mon Sep 17 00:00:00 2001 From: clayton craft Date: Mon, 17 Jul 2017 11:41:39 -0700 Subject: [PATCH] Fix PR #160, Fix #172 (#173) 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 --- pmbootstrap.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pmbootstrap.py b/pmbootstrap.py index 560bf1c4..e9e3d4ee 100755 --- a/pmbootstrap.py +++ b/pmbootstrap.py @@ -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")