-
Notifications
You must be signed in to change notification settings - Fork 17
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
Do not silently swallow import errors in non-prod environments #22
Comments
defining |
This was poorly explained. The idea was to separate finding I'm not sure what the best mechanism is, but something like this would work: import importlib
jsx_props_exists = importlib.util.find_spec('jsx_props')
if jsx_props_exists:
import jsx_props
self.default_props = jsx_props.__dict__.get('init%s'%name, dict) |
ah. yeah, that makes sense |
it seems that python already does this:
note the two different exception types |
Not if the error in
|
Do not silently swallow import errors in non-prod environments.
The text was updated successfully, but these errors were encountered: