From e4e235654288977a3a8d7680f152a7b3147e7b5f Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Tue, 11 Jun 2013 09:07:03 -0700 Subject: [PATCH] fix '-' in stage names for python imports --- catalyst/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/catalyst/main.py b/catalyst/main.py index 26e0c8b3..3f37ad0b 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -157,11 +157,12 @@ def import_module(target): def build_target(addlargs): try: - module = import_module(addlargs["target"]) - target = getattr(module, addlargs["target"])(conf_values, addlargs) + target = addlargs["target"].replace('-', '_') + module = import_module(target) + target = getattr(module, target)(conf_values, addlargs) except AttributeError: raise CatalystError( - "Target \"%s\" not available." % addlargs["target"], + "Target \"%s\" not available." % target, print_traceback=True) try: -- 2.26.2