Parser queue flushing

- the parser queue wasn't flushed when there's an exception resulting in
  the wrong message being displayed selected
master
Peter Šurda 7 years ago
parent 22eb4d62bf
commit 5c9bfe09a2
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

@ -131,7 +131,14 @@ class SafeHTMLParser(HTMLParser):
parserProcess.start()
parserLock.release()
else:
pass
# flush queue
try:
while True:
tmp = parserOutputQueue.get(False)
except Queue.Empty:
logger.debug("Parser queue flushed")
pass
self.raw += tmp
def is_html(self, text = None, allow_picture = False):

Loading…
Cancel
Save