Update exception detection to work with Python3 format.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -65,7 +65,7 @@ class MayanAppConfig(apps.AppConfig):
|
||||
)
|
||||
),
|
||||
except ImportError as exception:
|
||||
if force_text(exception) != 'No module named urls':
|
||||
if force_text(exception) not in ('No module named urls', 'No module named \'{}.urls\''.format(self.name)):
|
||||
logger.error(
|
||||
'Import time error when running AppConfig.ready(). Check '
|
||||
'apps.py, urls.py, views.py, etc.'
|
||||
|
||||
Reference in New Issue
Block a user