]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
fix a bug of warning caused by paramiko in CentOS 6
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 5 Sep 2016 08:33:08 +0000 (10:33 +0200)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 5 Sep 2016 08:33:08 +0000 (10:33 +0200)
salomeTools.py

index 55a5a5c8e6d6490b5bfbea0ded24e4d3c95e86f3..02f1dab206848057ae9d6b5a95e5a5d0d943e0c9 100755 (executable)
@@ -22,6 +22,7 @@
 # python imports
 import os
 import sys
+import tempfile
 import imp
 import types
 import gettext
@@ -143,7 +144,11 @@ class Sat(object):
             # Exception for the jobs command that requires the paramiko module
             if nameCmd == "jobs":
                 try:
+                    saveout = sys.stderr
+                    ff = tempfile.TemporaryFile()
+                    sys.stderr = ff
                     import paramiko
+                    sys.stderr = saveout
                 except:
                     continue