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