# HG changeset patch # User Mads Kiilerich # Date 1364429445 -3600 # Node ID 0a1417ef1a9ce8a0e43071094581512d92819a67 # Parent 260a7a01b054e6ffe7ff3f3e946e91813ceaac63 celery tasks: use None as special value Use a more common pattern. diff -r 260a7a01b054 -r 0a1417ef1a9c rhodecode/lib/celerylib/tasks.py --- a/rhodecode/lib/celerylib/tasks.py Thu Mar 28 01:10:45 2013 +0100 +++ b/rhodecode/lib/celerylib/tasks.py Thu Mar 28 01:10:45 2013 +0100 @@ -160,9 +160,9 @@ co_day_auth_aggr[akc(cs.author)]['data']] time_pos = l.index(k) except ValueError: - time_pos = False + time_pos = None - if time_pos >= 0 and time_pos is not False: + if time_pos >= 0 and time_pos is not None: datadict = \ co_day_auth_aggr[akc(cs.author)]['data'][time_pos]