Salome HOME
limit the impact for users not having psutil
authorCROUZET Nicolas <crouzet@is243948.intra.cea.fr>
Mon, 11 Apr 2022 08:15:05 +0000 (10:15 +0200)
committerCROUZET Nicolas <crouzet@is243948.intra.cea.fr>
Mon, 11 Apr 2022 08:15:05 +0000 (10:15 +0200)
src/system.py

index 842fb48bfdb8b6038a65d62c22bf012f33447b1d..17a7c06aa06b1ed038aeb353da8ec4ee1955ebcd 100644 (file)
@@ -25,7 +25,6 @@ import os
 import subprocess as SP
 import time
 import tarfile
-import psutil
 import time
  
 
@@ -65,6 +64,7 @@ def show_in_webbrowser(editor, filePath, logger):
     :param editor str: The web browser to use.
     :param filePath str: The path to the file to open.
     '''
+    import psutil
     # default editor is firefox
     if editor is None or len(editor) == 0:
         editor = 'firefox'