From: Gbkng Date: Fri, 1 Mar 2024 17:23:56 +0000 (+0100) Subject: fix(src): add two missing replacement of bare except clauses X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a271492711773391c7fa3b3f6ca13ec07c3d52da;p=tools%2Fsat.git fix(src): add two missing replacement of bare except clauses --- 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"])