-
Notifications
You must be signed in to change notification settings - Fork 12
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
wrong sys.exit argument #66
Comments
Thanks! So, reading
the usage seems legit as per the last case. Where're you getting
from? Cheers |
Oh, sorry. My problem related to pycharm pydevconsole. pydevconsole use os._exit() when handle exception, and os._exit() required integer value. Looks like your package can't work within pydevconsole when DEBUG not defined in the ENV or set to false and SECRET_KEY not defined. |
No worries! That sounds like it might be a bug their side then? If you could file an issue and link it here I'd love to follow along please :) Thanks again! |
I guess more generally it might be more friendly to throw an exception - would that be a helpful workaround for you? (I don't really understand the PyCharm issue you're having) |
Yes, that pydev bug. pydev interpreter override exit function. See do_exit function. |
@doismellburning throwing an exception is probably more friendly. It's also less opinionated, but I'm pretty sure it's the right way to go. Since the calling code might catch the exception, we should make it so that d12f doesn't load half of the |
line 118:
sys.exit("""DEBUG is False but no SECRET_KEY is set in the environment - either it has been hardcoded (bad) or not set at all (bad) - exit()ing for safety reasons""")
Argument should be integer value, so if error message is required, we should raise exception here.
The text was updated successfully, but these errors were encountered: