Skip to content

Commit

Permalink
fixed parameter parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Monnoroch committed Mar 15, 2015
1 parent 7af9614 commit 2174165
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gitstats
Original file line number Diff line number Diff line change
Expand Up @@ -663,8 +663,6 @@ class GitDataCollector(DataCollector):

for name in self.authors.keys():
a = self.authors[name]
#if a is None:
# continue
a['commits_frac'] = (100 * float(a['commits'])) / self.getTotalCommits()
date_first = datetime.datetime.fromtimestamp(a['first_commit_stamp'])
date_last = datetime.datetime.fromtimestamp(a['last_commit_stamp'])
Expand Down Expand Up @@ -1445,6 +1443,8 @@ class GitStats:
raise KeyError('no such key "%s" in config' % key)
if isinstance(conf[key], int):
conf[key] = int(value)
elif isinstance(conf[key], list):
conf[key].append(value)
else:
conf[key] = value
elif o in ('-h', '--help'):
Expand Down Expand Up @@ -1510,5 +1510,3 @@ if __name__=='__main__':
g = GitStats()
g.run(sys.argv[1:])


mon@open-freelancer:~/dev/go/src/openfreelancers$

0 comments on commit 2174165

Please sign in to comment.