[upload] Fix backtrace when cancelling upload#4057
Conversation
This commit fix a backtrace that appears when the user cancels a file upload after authentication. Related: RHEL-94968 Signed-off-by: Jose Castillo <jcastillo@redhat.com>
|
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
| self.ui_log.error(_(f"Cannot upload {self.archive}: {e} ")) | ||
| except KeyboardInterrupt: | ||
| self._exit("Exiting on user cancel", 130) | ||
|
|
There was a problem hiding this comment.
I was thinking about adding a general exception after KeyboardInterrupt to capture any other uncatched exceptions. Any thoughts on this?
There was a problem hiding this comment.
Might as well, of there is a chance for another issue to happen?
There was a problem hiding this comment.
I've tried to come up with possible ways to trigger other exceptions, but haven't found a way to get one yet. Rather, I thought I could add them generally after being explicit with the KeyboardInterrupt one, and if we capture one we can refine it later on (i.e. add a new explicit one before the general one).
arif-ali
left a comment
There was a problem hiding this comment.
if you've tried other means, lets stick with what we have, and we move on
This commit fix a backtrace that appears when
the user cancels a file upload after authentication.
Related: RHEL-94968
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines