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

Only avoid logging KeyboardInterrupt's #506

Closed
wants to merge 1 commit into from
Closed

Only avoid logging KeyboardInterrupt's #506

wants to merge 1 commit into from

Conversation

nathanwilk7
Copy link

@nathanwilk7 nathanwilk7 commented Dec 6, 2018

I've had some trouble lately with silent anaconda-client errors, so I started looking through the code to find the cause. I found that the issue was that the excepthook function returns without logging for all errors besides ServerError's. It seems possible to me that the intent here may have actually been to return without logging for only KeyboardInterrupt and ServerError, in which case let me know and I can just take out the not, but personally I don't see any reason to hide ServerError's from the user.

I'm proposing the following change based on my assumption that the desired behavior is to display the error message and error code to the user. If the desired behavior here is different than I assume, please let me know and I'd be happy to make whatever changes you suggest (including if there are any exception messages that may need to be more user friendly).

Before

anaconda-client:master$ python binstar_client/scripts/cli.py -t asdf upload -u myusername /path-to-build-output/build_output.tar.bz2
...
Uploading file "/path-to-build-outupt/osx-64/build_output.tar.bz2"
[WARNING] Distribution "osx-64/build_output.tar.bz2" already exists. Removing.

After (note the [ERROR] at the end)

anaconda-client:master$ python binstar_client/scripts/cli.py -t asdf upload -u myusername /path-to-build-output/build_output.tar.bz2
...
Uploading file "/path-to-build-outupt/osx-64/build_output.tar.bz2"
[WARNING] Distribution "osx-64/build_output.tar.bz2" already exists. Removing.
[ERROR] ('Authorization token is no longer valid', 401)

Related Issues

@nathanwilk7
Copy link
Author

@goanpeca Friendly bump on this, are you the current maintainer of this project?

@mjscosta mjscosta mentioned this pull request Dec 11, 2018
@nathanwilk7
Copy link
Author

Closed in favor of #507

@nathanwilk7 nathanwilk7 closed this Jul 8, 2019
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