Skip to content

Commit

Permalink
Fix parsing of authors
Browse files Browse the repository at this point in the history
The script was throwing an error when building chart "authors" with
Linux git repository: some lines with author have a count, but no name.
  • Loading branch information
flashcode committed Nov 10, 2013
1 parent 87603e0 commit a4c319e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gitchart.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import sys
import traceback

VERSION = '0.9'
VERSION = '1.0'


class GitChart:
Expand Down Expand Up @@ -154,7 +154,7 @@ def _chart_authors(self):
count_others = 0
sum_others = 0
for author in stdout:
(number, name) = author.strip().split('\t', 1)
(number, name) = author.strip(' ').split('\t', 1)
count += 1
if self.max_diff <= 0 or count <= self.max_diff:
pie_chart.add(name + ' ({0})'.format(number), int(number))
Expand Down

0 comments on commit a4c319e

Please sign in to comment.