From d32e5bc631503bb9ab2c885c73ab1d19bb166ab5 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 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: -- 2.26.2