From c96f51b193da2dab25bf4b991bef3a102c7ba64a Mon Sep 17 00:00:00 2001 From: navjot Date: Mon, 28 Sep 2020 15:28:40 +0530 Subject: [PATCH] ignoring ValueError from proofofwork module --- src/proofofwork.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/proofofwork.py b/src/proofofwork.py index e43e0f02..5b915017 100644 --- a/src/proofofwork.py +++ b/src/proofofwork.py @@ -291,7 +291,6 @@ def init(): global bitmsglib, bmpow openclpow.initCL() - if sys.platform == "win32": if ctypes.sizeof(ctypes.c_voidp) == 4: bitmsglib = 'bitmsghash32.dll' @@ -305,8 +304,7 @@ def init(): bmpow.restype = ctypes.c_ulonglong _doCPoW(2**63, "") logger.info("Successfully tested C PoW DLL (stdcall) %s", bitmsglib) - except: - logger.error("C PoW test fail.", exc_info=True) + except ValueError: try: # MinGW bso = ctypes.CDLL(os.path.join(paths.codePath(), "bitmsghash", bitmsglib)) @@ -315,8 +313,8 @@ def init(): bmpow.restype = ctypes.c_ulonglong _doCPoW(2**63, "") logger.info("Successfully tested C PoW DLL (cdecl) %s", bitmsglib) - except: - logger.error("C PoW test fail.", exc_info=True) + except Exception as e: + logger.error("Error: %s", e, exc_info=True) bso = None else: try: