[FIX] P3: ImportError text changed & text model fix

This commit is contained in:
Xavier Morel
2017-08-20 23:25:54 +02:00
committed by Olivier Dony
parent 481a00dc4b
commit 72083bc8ba
+1 -1
View File
@@ -434,7 +434,7 @@ def get_test_modules(module):
mod = importlib.import_module('.tests', modpath)
except Exception as e:
# If module has no `tests` sub-module, no problem.
if str(e) != 'No module named tests':
if not pycompat.text_type(e).startswith(u'No module named'):
_logger.exception('Can not `import %s`.', module)
return []