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=d32e5bc631503bb9ab2c885c73ab1d19bb166ab5;p=catalyst.git fix '-' in stage names for python imports --- diff --git a/catalyst/main.py b/catalyst/main.py index 9ca33ece..8c54849a 100755 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -155,11 +155,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: