-
Notifications
You must be signed in to change notification settings - Fork 149
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
Bug: exceptions are swallowed by __exit__ #102
Comments
@theY4Kman Thanks for raising this issue! It makes sense to raise an exception after stopping the spinner. Would you like to raise a PR for this? |
Haha! Yeah, might be tonight or tomorrow. |
I tried running Though the main change in the PR would prolly be one-line — even if I really want to add an In any case, man, thank you for some sexy-ass spinners. tqdm is really fuckin complicated, and after I figured out enough to appease me... I learned it didn't support indefinite progress at all :P Cheers! |
@theY4Kman Strange! The test cases should pass just fine locally. Since only animation tests are failing, I think this might be because of terminal size issues. Maybe you can check if it is because of the same. Please raise a PR/share the code and let me also evaluate. You're welcome! I'm trying my best to make this project complete and easy to develop with. |
@theY4Kman I just merged #99 which should fix this issue for you. |
Aww yiss! That did it! Thank you :) The linter fails with this guy I haven't had time to diagnose, yet, but with an interesting traceback like that, I'm dying to know what the hell it's doing
It's been a volcano at work for a hot minute — I'm hoping it'll die down, and I'll have Happy Fun Free Time™ again. I dig your motives, and you've been hella helpful; I'd love to contribute back. |
@theY4Kman Yes, that is because linter works on Python 2.7 which this project is mostly written in. It breaks on init-hook for Python 3. Since we can lint only for a particular Python version, I don't think there is a workaround for it but to install Python 2.7. |
just encountered this myself. if anyone is unclear how to move forward in the meantime, here's a quick shim: import contextlib
@contextlib.contextmanager
def halo_shim(text):
spinner = halo.Halo(text)
spinner.start()
try:
yield spinner
finally:
spinner.stop() |
Description
By returning a truthy value from
__exit__
, exceptions thrown when using Halo as a context manager are swallowed, and execution continues.System settings
Expected behaviour
Steps to recreate
The text was updated successfully, but these errors were encountered: