From 1d2fd619bdaf19ea922221a83073222390758247 Mon Sep 17 00:00:00 2001 From: Adam Waldenberg <adam.waldenberg@ejwa.se> Date: Thu, 6 Nov 2014 10:46:23 +0100 Subject: [PATCH] Fixed a special and unique KeyError exception that could occur. This is because of a mismatch between the changes module and the blame module. Seems to be triggered by empty rows in source files. --- gitinspector/blame.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gitinspector/blame.py b/gitinspector/blame.py index 652ff0e..08e8a9b 100644 --- a/gitinspector/blame.py +++ b/gitinspector/blame.py @@ -75,7 +75,10 @@ class BlameThread(threading.Thread): continue email = Blame.get_author_email(j) - author = self.changes.get_latest_author_by_email(email) + try: + author = self.changes.get_latest_author_by_email(email) + except KeyError: + continue __blame_lock__.acquire() # Global lock used to protect calls from here...