# HG changeset patch # User Mads Kiilerich # Date 2013-03-28 00:10:45 # Node ID 0a1417ef1a9ce8a0e43071094581512d92819a67 # Parent 260a7a01b054e6ffe7ff3f3e946e91813ceaac63 celery tasks: use None as special value Use a more common pattern. diff --git a/rhodecode/lib/celerylib/tasks.py b/rhodecode/lib/celerylib/tasks.py --- a/rhodecode/lib/celerylib/tasks.py +++ b/rhodecode/lib/celerylib/tasks.py @@ -160,9 +160,9 @@ def get_commits_stats(repo_name, ts_min_ 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]