Skip to content

Commit

Permalink
Fix for malformed error message in Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaspuff committed Jul 2, 2018
1 parent 7c45082 commit 2b71322
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tomodachi/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def import_service_file(cls, file_name: str) -> ModuleType:
if str(e) == "__path__ attribute not found on '{}' while trying to find '{}'".format(file_path_package_name.rsplit('/', 2)[1], '.'.join(file_path_package_name.rsplit('/', 2)[1:])):
logging.getLogger('import').warning('Invalid service package/parent name, may conflict with Python internals: "{}" - change parent folder name'.format(file_path.rsplit('/', 2)[1]))
raise ServicePackageError from e
if str(e) == "module '{}' has no attribute '__path__'".format(file_path_package_name.rsplit('/', 2)[1], '.'.join(file_path_package_name.rsplit('/', 2)[1:])):
if str(e) == "__path__ attribute not found on '{}'while trying to find '{}'".format(file_path_package_name.rsplit('/', 2)[1], '.'.join(file_path_package_name.rsplit('/', 2)[1:])):
logging.getLogger('import').warning('Invalid service package/parent name, may conflict with Python internals: "{}" - change parent folder name'.format(file_path.rsplit('/', 2)[1]))
raise ServicePackageError from e
raise e
Expand Down

0 comments on commit 2b71322

Please sign in to comment.