From 76edce6b21dbce8085b86663b80fb9beed350d7a Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 10 Jan 2013 10:18:45 -0500 Subject: [PATCH] Pyflakes fixes. --- bin/reviewday | 16 ++++++++++------ reviewday/__init__.py | 5 ----- reviewday/html_helper.py | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/bin/reviewday b/bin/reviewday index 1f1e45c..a6faffc 100755 --- a/bin/reviewday +++ b/bin/reviewday @@ -1,19 +1,23 @@ #!/usr/bin/env python from datetime import datetime -import reviewday +from reviewday.gerrit import reviews as gerrit_reviews +from reviewday.util import create_report +from reviewday.launchpad import LaunchPad +from reviewday.mergeprop import MergeProp +from reviewday.smokestack import SmokeStack -lp = reviewday.LaunchPad() -smoker = reviewday.SmokeStack('http://smokestack.openstack.org/jobs.json?limit=10000') +lp = LaunchPad() +smoker = SmokeStack('http://smokestack.openstack.org/jobs.json?limit=10000') projects = {} for project in ['nova', 'glance', 'keystone', 'swift', 'quantum', 'cinder']: if project not in projects: projects[project] = [] - for review in reviewday.reviews(project): + for review in gerrit_reviews(project): try: - mp = reviewday.MergeProp(lp, smoker, review) + mp = MergeProp(lp, smoker, review) projects[project].append(mp) except: print 'Error creating merge prop %s' % review @@ -21,4 +25,4 @@ for project in ['nova', 'glance', 'keystone', 'swift', 'quantum', 'cinder']: dts = str(datetime.utcnow())[0:19] name_space = {"projects": projects, "dts": dts} -reviewday.create_report(name_space) +create_report(name_space) diff --git a/reviewday/__init__.py b/reviewday/__init__.py index 4bc778c..e69de29 100644 --- a/reviewday/__init__.py +++ b/reviewday/__init__.py @@ -1,5 +0,0 @@ -from gerrit import reviews -from util import create_report -from launchpad import LaunchPad -from mergeprop import MergeProp -from smokestack import SmokeStack diff --git a/reviewday/html_helper.py b/reviewday/html_helper.py index 3dcfbd3..7b3acac 100644 --- a/reviewday/html_helper.py +++ b/reviewday/html_helper.py @@ -18,7 +18,7 @@ def fail_status(job_data, token): color = '00AA00' else: color = '000000' - return output % locals() + return output % color def review_feedback(mp):