From: Brian Dolbec Date: Tue, 11 Jun 2013 16:07:03 +0000 (-0700) Subject: fix '-' in stage names for python imports X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e4e235654288977a3a8d7680f152a7b3147e7b5f;p=catalyst.git fix '-' in stage names for python imports --- 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: