Fix ignore directive when filenames differ (fix bug#6)
- My thanks to Bernhard Herzog who provided the patch!
This commit is contained in:
parent
1623be3119
commit
f372da2530
|
@ -1207,7 +1207,7 @@ def process_directive():
|
|||
hitfound = 0
|
||||
# Iterate backwards over hits, to be careful about the destructive iterator
|
||||
for i in xrange(len(hitlist)-1, -1, -1):
|
||||
if hitlist[i].line == linenumber:
|
||||
if hitlist[i].filename == filename and hitlist[i].line == linenumber:
|
||||
del hitlist[i] # DESTROY - this is a DESTRUCTIVE iterator.
|
||||
hitfound = 1 # Don't break, because there may be more than one.
|
||||
num_ignored_hits = num_ignored_hits + 1
|
||||
|
|
Loading…
Reference in New Issue