[Pkg-debile-commits] [debile-master] 05/126: syntax error

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:56:05 UTC 2013


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch scan-build-html
in repository debile-master.

commit 647e66fd1fb2df1cfd9af8e159cd5154c9ccb775
Author: Paul Tagliamonte <tag at pault.ag>
Date:   Tue May 21 15:20:50 2013 -0400

    syntax error
---
 lucy/server.py |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lucy/server.py b/lucy/server.py
index 8392377..5292b8e 100644
--- a/lucy/server.py
+++ b/lucy/server.py
@@ -49,10 +49,14 @@ class LucyInterface(object):
 
     def get_next_job(self, job_type):
         ajobs = list(Job.assigned_jobs(NAMESPACE.machine['_id']))
-        if len(ajobs) != []:
+        if ajobs != []:
             return dict(ajobs[0])
 
-        job = Job.next_job(type=job_type)
+        try:
+            job = Job.next_job(type=job_type)
+        except KeyError:
+            return None
+
         job['builder'] = NAMESPACE.machine['_id']
         job['assigned_at'] = dt.datetime.utcnow()
         job.save()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git



More information about the Pkg-debile-commits mailing list