Archived
1
0

handle any leftover exceptions

* Globally catch any unhandled expections (but SystemExit) and report an UNKNOWN status.
  This includes catching of KeyboardInterrupt, for which I don’t see any reason for special handling.
This commit is contained in:
Christoph Anton Mitterer 2012-10-09 02:22:23 +02:00
parent 45b62cf073
commit 5fa4ec3016

View File

@ -467,9 +467,10 @@ def main():
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print "Caught Control-C..."
sys.exit(CRITICAL)
except SystemExit:
pass
except:
end(UNKNOWN, "check_yum failed for unknown reasons.")