From 074af725368ea088228b97aa83dc4a0683626273 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 18 Jul 2012 12:55:34 +0200 Subject: [PATCH] Minor fix for empty dict check. --- rq/job.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rq/job.py b/rq/job.py index ce7c754..79239b3 100644 --- a/rq/job.py +++ b/rq/job.py @@ -194,8 +194,7 @@ class Job(object): """ key = self.key obj = self.connection.hgetall(key) - # hgetall returns an empty dict if key doesn't exist - if obj == {}: + if not obj: raise NoSuchJobError('No such job: %s' % (key,)) def to_date(date_str):