The changes module could crash upon no detected file types (Fixes #68).

The sub list flattening happening after all the "changes threads" have
run should be happening before the len(self.commits) check, not after.
This commit is contained in:
Adam Waldenberg 2015-09-30 15:10:46 +02:00
parent e4827ee58e
commit 243e52b5de

View file

@ -211,9 +211,9 @@ class Changes:
for i in range(0, NUM_THREADS):
__thread_lock__.acquire()
if len(self.commits) > 0:
self.commits = [item for sublist in self.commits for item in sublist]
self.commits = [item for sublist in self.commits for item in sublist]
if len(self.commits) > 0:
if interval.has_interval() and len(self.commits) > 0:
interval.set_ref(self.commits[-1].sha)