Fix an uncaught exception in the Default Client advanced preferences from messing up the UI by removing all traces of MSN and Yahoo from the URL handler code.
importdatetime
importplistlib
importre
importsgmllib
classReport(list):
type=""
reportfile=""
sourcefile=""
endpathline=0
defappend(self,something):
# We don't want anything but ReportItems
ifnotisinstance(something,ReportItem):
raiseTypeError
else:
list.append(self,something)
def__eq__(self,other):
# This is where we'll implement our logic for deciding whether or not
# two reports refer to the same issue.
# They must be in the same source file
ifself.sourcefile!=other.sourcefile:
returnFalse
# They have to have to be of the same type
ifself.type!=other.type:
returnFalse
# They should have the same path length
iflen(self)!=len(other):
returnFalse
# Compare each item in the reports
foriinrange(0,len(self)):
# The lines should be within (drumroll for magic number)
ifabs(self[i].line-other[i].line)>20:
returnFalse
# The comments should be the same, line numbers notwithstanding