don't corrupt stdout (-o -) in verbose mode

This commit is contained in:
chocolateboy 2012-05-30 11:50:13 +01:00
parent f36cd07685
commit 6ab92c8b62
4 changed files with 7 additions and 6 deletions

View file

@ -83,7 +83,7 @@ class IDParser(HTMLParser.HTMLParser):
HTMLParser.HTMLParser.__init__(self)
def error(self, message):
print self.getpos()
print >> sys.stderr, self.getpos()
if self.error_count > 10 or self.started:
raise HTMLParser.HTMLParseError(message, self.getpos())
self.rawdata = '\n'.join(self.html.split('\n')[self.getpos()[0]:]) # skip one line