From 7052c734bd64831006fd7767671d8227a2b16e05 Mon Sep 17 00:00:00 2001 From: Mahendra Date: Fri, 6 Apr 2018 19:00:32 +0530 Subject: [PATCH] Add log for thread error on helper_generic file - Remove if condition for RegExParser --- src/helper_generic.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/helper_generic.py b/src/helper_generic.py index 7b99bbdc..adbbc66c 100644 --- a/src/helper_generic.py +++ b/src/helper_generic.py @@ -1,5 +1,5 @@ """This module is to perform generic oprations for threading.""" -"""and some conversion operations.""" +"""And some conversion operations.""" import socket import sys @@ -12,6 +12,7 @@ import shared from debug import logger import queues import shutdown +from debug import logger def powQueueSize(): @@ -20,8 +21,8 @@ def powQueueSize(): try: if thread.name == "singleWorker": curWorkerQueue += thread.busy - except Exception: - print "" + except Exception as err: + logger.info("Thread error %s", err) return curWorkerQueue @@ -57,10 +58,6 @@ def signal_handler(signal, frame): logger.error("Got signal %i in %s/%s", signal, current_process().name, threading.current_thread().name) - if current_process().name == "RegExParser": - # on Windows this isn't triggered, but it's fine, - # it has its own process termination thing - raise SystemExit if "PoolWorker" in current_process().name: raise SystemExit if threading.current_thread().name not in (