diff --git a/teuthology/run_tasks.py b/teuthology/run_tasks.py index 598947c807..ad1407a9c6 100644 --- a/teuthology/run_tasks.py +++ b/teuthology/run_tasks.py @@ -29,9 +29,17 @@ def get_task(name): # First look for the tasks's module inside teuthology module = _import('teuthology.task', module_name, task_name) + log.info("importing module_name: {} and task_name: {}".format( + module_name, + task_name, + )) # If it is not found, try qa/ directory (if it is in sys.path) if not module: - module = _import('tasks', module_name, task_name, fail_on_import_error=True) + try: + module = _import('tasks', module_name, task_name, fail_on_import_error=True) + except Exception as e: + log.error('An exception occurred: {}'.format(e)) + raise try: # Attempt to locate the task object inside the module task = getattr(module, task_name)