From 4b1267ba39b214679cd4e59edd6966a5f566382f Mon Sep 17 00:00:00 2001 From: Adam Waldenberg Date: Sat, 5 May 2012 23:24:14 +0200 Subject: [PATCH] The changes module no longer generates file diffs with 0 insertions/deletions. Under certain conditions this could previously cause a division by zero in the timeline.TimelineData.get_multiplier() method. --- changes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes.py b/changes.py index 6848d84..772b391 100644 --- a/changes.py +++ b/changes.py @@ -35,7 +35,7 @@ class FileDiff: @staticmethod def is_filediff_line(string): string = string.split("|") - return string.__len__() == 2 and string[1].find("Bin") == -1 + return string.__len__() == 2 and string[1].find("Bin") == -1 and ('+' in string[1] or '-' in string[1]) @staticmethod def get_extension(string):