From e2512dba0c3789a0cc1d1089098d9e12ad951f5a Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 1 Dec 2013 19:45:00 +0100 Subject: [PATCH] Cath all errors in threads Makes in possible to empty the queue whatsoever happens --- morss.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/morss.py b/morss.py index 4e3d15f..7f7790d 100644 --- a/morss.py +++ b/morss.py @@ -534,7 +534,11 @@ def Gather(url, cachePath, options): # set def runner(queue): while True: - worker(*queue.get()) + value = queue.get() + try: + worker(*value) + except: + log('random error in thread') queue.task_done() def worker(i, item):