Changeset - 0a1417ef1a9c
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-03-28 01:10:45
madski@unity3d.com
celery tasks: use None as special value

Use a more common pattern.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/celerylib/tasks.py
Show inline comments
 
@@ -157,15 +157,15 @@ def get_commits_stats(repo_name, ts_min_
 
            if akc(cs.author) in co_day_auth_aggr:
 
                try:
 
                    l = [timegetter(x) for x in
 
                         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]
 

	
 
                    datadict["commits"] += 1
 
                    datadict["added"] += len(cs.added)
0 comments (0 inline, 0 general)