cosmetic: replace "type" by "type_name"
authorOlivier Matz <olivier.matz@6wind.com>
Fri, 15 Jun 2012 13:02:20 +0000 (15:02 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Thu, 9 Aug 2012 18:02:16 +0000 (20:02 +0200)
Indeed "type" is a reserved word:
http://pentangle.net/python/handbook/node52.html

Signed-off-by: Sergey Satskiy <sergey.satskiy@gmail.com>
Signed-off-by: Olivier Matz <zer0@droids-corp.org>
diff2html.py

index 36d191b..ad6eaee 100644 (file)
@@ -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('<tr class="diff%s">'%type)
+    outputfile.write('<tr class="diff%s">'%type_name)
     if s1!=None and s1!="":
         outputfile.write('<td class="diffline">%d </td>'%line1)
         outputfile.write('<td class="diffpresent">')