diff options
author | 2017-08-24 21:52:41 -0700 | |
---|---|---|
committer | 2017-08-28 02:23:46 -0700 | |
commit | d4532555c8c04d0813be51cfa5d3253bd19f31bf (patch) | |
tree | 8952a80939041dcd7405ceeb51f30ebe48ac6ec5 /yardstick | |
parent | 6b762e9edb2f7913348d99c1c240fe94b9f7cbf9 (diff) |
utils: catch SyntaxError during import
bad modules can also throw SyntaxError besides ImportError
Change-Id: I4fa912505753cba3c06f127105354572b7f5ddd8
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'yardstick')
-rw-r--r-- | yardstick/common/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yardstick/common/utils.py b/yardstick/common/utils.py index 1d7ea071c..68c9ed63f 100644 --- a/yardstick/common/utils.py +++ b/yardstick/common/utils.py @@ -90,7 +90,7 @@ def import_modules_from_package(package): for module_name in missing_modules: try: sys.modules[module_name] = importutils.import_module(module_name) - except ImportError: + except (ImportError, SyntaxError): logger.exception("unable to import %s", module_name) |