Fixes relative import for utils 29/55029/1
authorTim Rozet <trozet@redhat.com>
Thu, 5 Apr 2018 21:46:24 +0000 (17:46 -0400)
committerTim Rozet <trozet@redhat.com>
Thu, 5 Apr 2018 21:46:24 +0000 (17:46 -0400)
opnfv-pyutil was not working due to this relative import.  The script
would only work out of the pwd.

Change-Id: I1ed5db779dd031d019012a814b2dfe27944a2e2f
Signed-off-by: Tim Rozet <trozet@redhat.com>
apex/utils.py

index 56caaef..f791461 100644 (file)
@@ -70,7 +70,7 @@ def fetch_logs(args):
 def execute_actions(args):
     for action in VALID_UTILS:
         if hasattr(args, action) and getattr(args, action):
-            util_module = __import__('utils')
+            util_module = __import__('apex').utils
             func = getattr(util_module, action)
             logging.info("Executing action: {}".format(action))
             func(args)