]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
fix(src): add two missing replacement of bare except clauses
authorGbkng <guillaume.brooking@gmail.com>
Fri, 1 Mar 2024 17:23:56 +0000 (18:23 +0100)
committerGbkng <guillaume.brooking@gmail.com>
Fri, 1 Mar 2024 17:23:56 +0000 (18:23 +0100)
src/architecture.py

index f631fbcde920d47003f56049fac395e3733f943c..ad06c80e9ef6b819c62652dead451892a8f6498a 100644 (file)
@@ -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"])