From: Olivier Matz Date: Fri, 15 Jun 2012 13:02:20 +0000 (+0200) Subject: cosmetic: replace "type" by "type_name" X-Git-Tag: v1.0~15 X-Git-Url: http://git.droids-corp.org/?p=diff2html.git;a=commitdiff_plain;h=adac51ce681152158a4165c6cdf3f58363f2d859;hp=68c39b65bc6c15f2df60564f0599bdfdb24d91c0 cosmetic: replace "type" by "type_name" Indeed "type" is a reserved word: http://pentangle.net/python/handbook/node52.html Signed-off-by: Sergey Satskiy Signed-off-by: Olivier Matz --- diff --git a/diff2html.py b/diff2html.py index 36d191b..ad6eaee 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('')