Minor fix for empty dict check.

This commit is contained in:
Vincent Driessen 2012-07-18 12:55:34 +02:00
parent 809874ee83
commit 074af72536
1 changed files with 1 additions and 2 deletions

View File

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