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):