summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@redhat.com>2012-05-08 15:28:48 -0400
committerJosh Boyer <jwboyer@redhat.com>2012-05-08 15:28:48 -0400
commit9207c57530458afcbbe2650248d83dec570aab8e (patch)
treefc7a27ad7e8bf2412acd2a53eda9c1d56dac640b
parent47a3ed8d04decea4261f85247b24e97198e16274 (diff)
downloadkoji-bisect-9207c57530458afcbbe2650248d83dec570aab8e.tar.gz
koji-bisect-9207c57530458afcbbe2650248d83dec570aab8e.tar.xz
koji-bisect-9207c57530458afcbbe2650248d83dec570aab8e.zip
Only connect to koji when we have to
Don't call active_session globally. Make the places that need it call it. Yay for less superfluous delays
-rwxr-xr-xkoji-bisect.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/koji-bisect.py b/koji-bisect.py
index 5811a72..9bd2dc9 100755
--- a/koji-bisect.py
+++ b/koji-bisect.py
@@ -118,6 +118,7 @@ def activate_session(session):
# This is copied almost directly from koji. Sigh again.
def download_build(session, build):
+ activate_session(session)
info = session.getBuild(build)
if info is None:
@@ -289,10 +290,10 @@ if __name__ == "__main__":
bisect_data = bisect_load()
session = koji.ClientSession(options.server)
- activate_session(session)
if bisect_data['builds_left'] == None:
+ activate_session(session)
all_builds = session.listBuilds(packageID=8, state=1)
builds = all_builds