flake8 + change ModuleNotFoundError to ImportError (support py 2.7/3.5)

This commit is contained in:
allegroai
2020-07-30 15:07:25 +03:00
parent a8d6380696
commit 23394a265d
16 changed files with 47 additions and 37 deletions

View File

@@ -57,10 +57,10 @@ class ExtApiServiceProxy(ApiServiceProxy):
for module_path in self._get_services_modules():
try:
return importlib.import_module(name, package=module_path)
except ModuleNotFoundError:
except ImportError:
pass
raise ModuleNotFoundError(
raise ImportError(
"No module '{}' in all predefined services module paths".format(name)
)