-
-
Notifications
You must be signed in to change notification settings - Fork 533
WIP: catch plugin loading failure #1817
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
Conversation
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## rewrite #1817 +/- ##
===========================================
- Coverage 99.76% 99.73% -0.03%
===========================================
Files 133 133
Lines 7128 7133 +5
Branches 711 711
===========================================
+ Hits 7111 7114 +3
- Misses 6 8 +2
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, something similar I was thinking.
@@ -42,12 +43,16 @@ def __init__(self) -> None: | |||
) | |||
|
|||
for plugin in internal_plugins: | |||
logging.info("Registering %s", plugin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to be silent if nothing bad happens.
REGISTER.populate(self) | ||
self.manager.check_pending() | ||
except ImportError as e: | ||
logging.warning("Ignored plugin %s which failed to load. %s", NAME, e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you want %r
to show the type too. And ideally, we'd also show the last source code line of the traceaback (you can get it via traceback.format_exc).
I'll close this now as it seems we'll not be able to merge it. |
No description provided.