Parser queue flushing
- the parser queue wasn't flushed when there's an exception resulting in the wrong message being displayed selected
This commit is contained in:
parent
22eb4d62bf
commit
5c9bfe09a2
|
@ -131,7 +131,14 @@ class SafeHTMLParser(HTMLParser):
|
||||||
parserProcess.start()
|
parserProcess.start()
|
||||||
parserLock.release()
|
parserLock.release()
|
||||||
else:
|
else:
|
||||||
|
# flush queue
|
||||||
|
try:
|
||||||
|
while True:
|
||||||
|
tmp = parserOutputQueue.get(False)
|
||||||
|
except Queue.Empty:
|
||||||
|
logger.debug("Parser queue flushed")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
self.raw += tmp
|
self.raw += tmp
|
||||||
|
|
||||||
def is_html(self, text = None, allow_picture = False):
|
def is_html(self, text = None, allow_picture = False):
|
||||||
|
|
Reference in New Issue
Block a user