From a271492711773391c7fa3b3f6ca13ec07c3d52da Mon Sep 17 00:00:00 2001 From: Gbkng Date: Fri, 1 Mar 2024 18:23:56 +0100 Subject: [PATCH] fix(src): add two missing replacement of bare except clauses --- src/architecture.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/architecture.py b/src/architecture.py index f631fbc..ad06c80 100644 --- a/src/architecture.py +++ b/src/architecture.py @@ -59,7 +59,7 @@ def get_user(): else: # linux import pwd user_name=pwd.getpwuid(os.getuid())[0] - except : + except Exception: user_name="Unknown" return user_name @@ -160,7 +160,7 @@ def get_nb_proc(): try : import multiprocessing nb_proc=multiprocessing.cpu_count() - except : + except Exception: if is_windows(): if os.environ.has_key("NUMBER_OF_PROCESSORS"): nb_proc = int(os.environ["NUMBER_OF_PROCESSORS"]) -- 2.39.2