Minor fix for empty dict check.

main
Vincent Driessen 13 years ago
parent 809874ee83
commit 074af72536

@ -194,8 +194,7 @@ class Job(object):
""" """
key = self.key key = self.key
obj = self.connection.hgetall(key) obj = self.connection.hgetall(key)
# hgetall returns an empty dict if key doesn't exist if not obj:
if obj == {}:
raise NoSuchJobError('No such job: %s' % (key,)) raise NoSuchJobError('No such job: %s' % (key,))
def to_date(date_str): def to_date(date_str):

Loading…
Cancel
Save