Fix for KeyError being generated if a month has commits but for some reason no lines...
commit750ddfe35a0fb72a9988bf09c2f4139feb3603a2
authorChris Cormack <chrisc@catalyst.net.nz>
Tue, 27 Sep 2011 19:32:23 +0000 (28 08:32 +1300)
committerHeikki Hokkanen <hoxu@users.sf.net>
Wed, 28 Sep 2011 16:27:06 +0000 (28 19:27 +0300)
tree8b0c2146b5bcaaef744dfd2d7305d335ed8ea6af
parent2acf4392ad8099af488a2395670a951ddd6f634c
Fix for KeyError being generated if a month has commits but for some reason no lines changed

Example of exception

[1.17747] >> gnuplot --version
Traceback (most recent call last):
  File "./gitstats", line 1373, in <module>
      g.run(sys.argv[1:]
  File "./gitstats", line 1365, in run
     report.create(data, outputpath)
  File "./gitstats", line 841, in create
     f.write('<tr><td>%s</td><td>%d</td><td>%d</td><td>%d</td></tr>' % (yymm, data.commits_by_month[yymm], data.lines_added_by_month[yymm],
   data.lines_removed_by_month[yymm]))
KeyError: '2010-08'

Signed-off-by: Heikki Hokkanen <hoxu@users.sf.net>
gitstats