summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@redhat.com>2012-05-09 12:17:02 -0400
committerJosh Boyer <jwboyer@redhat.com>2012-05-09 12:17:02 -0400
commit549adcddfda7ffeeed2e4c07a38340c29b69da7f (patch)
tree1f0aad5bae88a9d86e7bc46f0df91433a2407c32
parent7df6781f1d0e86c3499279c793ce3835bbbcc0a6 (diff)
downloadkoji-bisect-549adcddfda7ffeeed2e4c07a38340c29b69da7f.zip
koji-bisect-549adcddfda7ffeeed2e4c07a38340c29b69da7f.tar.gz
koji-bisect-549adcddfda7ffeeed2e4c07a38340c29b69da7f.tar.xz
Make list_builds more descriptive
Now print the currently marked good, bad, and current builds
-rwxr-xr-xkoji-bisect.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/koji-bisect.py b/koji-bisect.py
index 2f79891..a8b734a 100755
--- a/koji-bisect.py
+++ b/koji-bisect.py
@@ -202,9 +202,16 @@ def get_args():
return parser.parse_args()
-def list_builds(builds):
- for build in builds:
- print build
+def list_builds(bisect_data):
+ for build in bisect_data['builds_left']:
+ if build == bisect_data['good']:
+ print build + ' good build'
+ elif build == bisect_data['bad']:
+ print build + ' bad build'
+ elif build == bisect_data['current']:
+ print build + ' current build'
+ else:
+ print build
def bisect_log(string):
global bisect_log_file
@@ -324,7 +331,7 @@ if __name__ == "__main__":
if not args.good and not args.bad:
if args.list:
- list_builds(bisect_data['builds_left'])
+ list_builds(bisect_data)
bisect_save(bisect_data)
sys.exit(0)
else:
@@ -340,7 +347,7 @@ if __name__ == "__main__":
except ValueError:
print "Invalid build %s. Please pick from list:" % args.good
- list_builds(bisect_data['builds_left'])
+ list_builds(bisect_data)
sys.exit(1)
if args.bad:
@@ -349,7 +356,7 @@ if __name__ == "__main__":
except ValueError:
print "Invalid build %s. Please pick from list:" % args.bad
- list_builds(bisect_data['builds_left'])
+ list_builds(bisect_data)
sys.exit(1)
if bisect_data['good'] and bisect_data['bad']:
@@ -379,4 +386,4 @@ if __name__ == "__main__":
if args.list:
- list_builds(bisect_data['builds_left'])
+ list_builds(bisect_data)