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:
parent
3c48789890
commit
ba049a0367
|
@ -239,6 +239,8 @@ class Changes(object):
|
||||||
|
|
||||||
for commit in other.commits:
|
for commit in other.commits:
|
||||||
bisect.insort(self.commits, commit)
|
bisect.insort(self.commits, commit)
|
||||||
|
if not self.commits and not other.commits:
|
||||||
|
self.commits = []
|
||||||
|
|
||||||
return self
|
return self
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
Loading…
Reference in New Issue