Last active
March 15, 2023 18:34
-
-
Save abadger/9b26719e2295d3b683b914e81e44f11c to your computer and use it in GitHub Desktop.
Have catchalls reraise KeyboardInterrupt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
subscription_manager_stuff() | |
# Not needed as long as we do not catch BaseException later on | |
# except KeyboardInterrupt: | |
# raise | |
except KnownError: | |
self.set_result("NICE_ERROR_CODE", "ERROR", "Nice error message") | |
except (Exception, SystemExit) as e: | |
self.set_result("UNKNOWN_ERROR", "ERROR", "Unknown Error was returned: %s" % e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment