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.
This commit is contained in:
Adam Waldenberg 2015-12-12 07:49:58 +01:00
parent 3c48789890
commit ba049a0367

View file

@ -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: