Fix another div by zero error when there are no reviews

Change-Id: I81e5f6c6d51d54f1eb377846e5695a68998612cb
This commit is contained in:
Russell Bryant 2014-03-15 07:10:22 -04:00
parent 537e9d5aba
commit 86a3870682
1 changed files with 2 additions and 1 deletions

View File

@ -206,7 +206,8 @@ def write_pretty(reviewer_data, file_obj, options, reviewers, projects,
float(queue_growth) / options.days))
file_obj.write(
' Average number of patches per changeset: %.1f\n'
% (float(change_stats['patches']) / change_stats['involved']))
% (float(change_stats['patches']) / change_stats['involved']
if change_stats['involved'] else 0))
file_obj.write(
'\n(*) Disagreements are defined as a +1 or +2 vote on a '
'patch where a core team member later gave a -1 or -2 vote'