1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#!/usr/bin/python import os import sys sys.path.insert(0, os.path.dirname(__file__)) import icommon db = icommon.StatusDatabase(icommon.sqlite_file) reason = db.failure_reason(sys.argv[1]) if reason is None: print "%s has not failed" % sys.argv[1] sys.exit(1) print reason |