Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle optional import where imported module raises exception on import #1192

Merged
merged 2 commits into from
Sep 25, 2018

Conversation

jonmmease
Copy link
Contributor

See #696

import unittest.mock as mock
else:
import mock

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mock is not used here

_not_importable.add(name)
msg = "Error importing optional module {}".format(name)
logger.exception(msg)
# logger.error(msg)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment


logger = logging.getLogger(__name__)
print(__name__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove print statement

@jonmmease jonmmease merged commit 237b6e1 into master Sep 25, 2018
@jonmmease jonmmease mentioned this pull request Sep 26, 2018
@nicolaskruchten nicolaskruchten deleted the bug_696 branch June 19, 2020 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant