From ba049a0367bc612ad3946e3ced2bac314a754851 Mon Sep 17 00:00:00 2001 From: Adam Waldenberg Date: Sat, 12 Dec 2015 07:49:58 +0100 Subject: [PATCH] Fix AttributeError thrown when no extensions were detected (Fixes #91). The bug was introduced with the commit ecc67a3 and was caused by the initialization of an empty Changes object. This fix makes sure that the __iadd__() method properly handles empty change sets and returns a satisfactory object back when completing execution. --- gitinspector/changes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gitinspector/changes.py b/gitinspector/changes.py index 1d1f620..7816c08 100644 --- a/gitinspector/changes.py +++ b/gitinspector/changes.py @@ -239,6 +239,8 @@ class Changes(object): for commit in other.commits: bisect.insort(self.commits, commit) + if not self.commits and not other.commits: + self.commits = [] return self except AttributeError: