X-Git-Url: http://git.droids-corp.org/?p=diff2html.git;a=blobdiff_plain;f=diff2html.py;h=14094de32ce11d54b9f7c2daf7515a0e68cce2ed;hp=36d191bc84de961fd18c586af2f4b7cd2372e155;hb=d5d43cb0e52cacb457e5c96329e18bf54a2e0ea5;hpb=68c39b65bc6c15f2df60564f0599bdfdb24d91c0 diff --git a/diff2html.py b/diff2html.py index 36d191b..14094de 100644 --- a/diff2html.py +++ b/diff2html.py @@ -229,18 +229,18 @@ def add_line(s1, s2): global line2 if s1==None and s2==None: - type="unmodified" + type_name="unmodified" elif s1==None or s1=="": - type="added" + type_name="added" elif s2==None or s1=="": - type="deleted" + type_name="deleted" elif s1==s2: - type="unmodified" + type_name="unmodified" else: - type="changed" + type_name="changed" s1,s2 = linediff(s1, s2) - outputfile.write(''%type) + outputfile.write(''%type_name) if s1!=None and s1!="": outputfile.write('%d '%line1) outputfile.write('') @@ -283,8 +283,8 @@ def empty_buffer(): l0.append(l[0]) if l[1] != None: l1.append(l[1]) - max = (len(l0) > len(l1)) and len(l0) or len(l1) - for i in range(max): + max_len = (len(l0) > len(l1)) and len(l0) or len(l1) + for i in range(max_len): s0, s1 = "", "" if i