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">')
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<len(l0):
s0 = l0[i]