##// END OF EJS Templates
parsers: remove redundant 'n' variable in parsers.parse_index2() (issue2935)
py4fun -
r14995:8d928799 default
parent child Browse files
Show More
@@ -36,7 +36,7 b' def parse_index2(data, inline):'
36 s = struct.calcsize(indexformatng)
36 s = struct.calcsize(indexformatng)
37 index = []
37 index = []
38 cache = None
38 cache = None
39 n = off = 0
39 off = 0
40
40
41 l = len(data) - s
41 l = len(data) - s
42 append = index.append
42 append = index.append
@@ -45,7 +45,6 b' def parse_index2(data, inline):'
45 while off <= l:
45 while off <= l:
46 e = _unpack(indexformatng, data[off:off + s])
46 e = _unpack(indexformatng, data[off:off + s])
47 append(e)
47 append(e)
48 n += 1
49 if e[1] < 0:
48 if e[1] < 0:
50 break
49 break
51 off += e[1] + s
50 off += e[1] + s
@@ -53,7 +52,6 b' def parse_index2(data, inline):'
53 while off <= l:
52 while off <= l:
54 e = _unpack(indexformatng, data[off:off + s])
53 e = _unpack(indexformatng, data[off:off + s])
55 append(e)
54 append(e)
56 n += 1
57 off += s
55 off += s
58
56
59 if off != len(data):
57 if off != len(data):
General Comments 0
You need to be logged in to leave comments. Login now