You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kibble.apache.org by hu...@apache.org on 2017/10/21 20:30:05 UTC
[kibble] branch master updated: replace kludge with a simple empty
test
This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kibble.git
The following commit(s) were added to refs/heads/master by this push:
new 23fac54 replace kludge with a simple empty test
23fac54 is described below
commit 23fac54ae31c0360b691f0afbfce8419422ba609
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Sat Oct 21 22:29:56 2017 +0200
replace kludge with a simple empty test
---
api/pages/code/evolution.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/api/pages/code/evolution.py b/api/pages/code/evolution.py
index f6909ac..3d31bfd 100644
--- a/api/pages/code/evolution.py
+++ b/api/pages/code/evolution.py
@@ -146,9 +146,10 @@ def run(API, environ, indata, session):
if breakdown:
pass
else:
- item['blanks'] = item.get('blanks', 0) + int(updates['blank'])
- item['comments'] = item.get('comments', 0) + int(updates['comments'])
- item['code'] = item.get('code', 0) + int(updates['loc'])
+
+ item['blanks'] = item.get('blanks', 0) + (updates['blank'] or 0)
+ item['comments'] = item.get('comments', 0) + (updates['comments'] or 0)
+ item['code'] = item.get('code', 0) + (updates['loc'] or 0)
res = session.DB.ES.scroll(scroll_id = sid, scroll = '1m')
sid = res['_scroll_id']
--
To stop receiving notification emails like this one, please contact
['"commits@kibble.apache.org" <co...@kibble.apache.org>'].