Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : skvidal-backend
---------------------------------------------------------------
commit 02f9e18594e1a03d9bc127da601e45aebaca8b0c
Author: Seth Vidal <skvidal(a)fedoraproject.org>
Date: Thu Dec 6 02:00:11 2012 -0500
older python-requests doesn't have attribute :(
---------------------------------------------------------------
copr-be.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index 8ab8470..27ceb03 100644
--- a/copr-be.py
+++ b/copr-be.py
@@ -106,10 +106,13 @@ class CoprBackend(object):
except requests.RequestException, e:
self.log('Error retrieving jobs from %s: %s' %
(self.opts.frontend_url, e))
else:
- if 'builds' in r.json:
- self.log('%s jobs returned' % len(r.json['builds']))
+
+
+ r_json = json.loads(r.content) # using old requests on el6 :(
+ if 'builds' in r_json:
+ self.log('%s jobs returned' % len(r_json['builds']))
count = 0
- for b in r.json['builds']:
+ for b in r_json['builds']:
if 'id' in b:
jobfile = self.opts.jobsdir + '/%s.json' %
b['id']
if not os.path.exists(jobfile) and b['id'] not in
self.added_jobs: