bodhi/tools/metrics.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit ff27916e4665eb97b1141dbd96dcced54f262233
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue May 25 10:18:28 2010 -0400
Ignore admin groups when tracking comment author metrics
diff --git a/bodhi/tools/metrics.py b/bodhi/tools/metrics.py
index dfc5c39..9968d99 100755
--- a/bodhi/tools/metrics.py
+++ b/bodhi/tools/metrics.py
@@ -74,11 +74,12 @@ def main():
if comment.karma != 0:
data['num_anon_feedback'] += 1
else:
- if comment.author not in data['karma']:
- data['karma'][comment.author] = 0
- karma[comment.author] = 0
- data['karma'][comment.author] += 1
- karma[comment.author] += 1
+ author = comment.author.split('(')[0]
+ if author not in data['karma']:
+ data['karma'][author] = 0
+ karma[author] = 0
+ data['karma'][author] += 1
+ karma[author] += 1
if (not testingtime_done and
comment.text == 'This update has been pushed to testing'):
for othercomment in update.comments:
Show replies by thread