Salome HOME
Integration of the "23656: [CEA] Path for PortManager.py for Windows platform" issue.
authorrnv <rnv@opencascade.com>
Mon, 14 Jan 2019 11:10:01 +0000 (14:10 +0300)
committervsr <vsr@opencascade.com>
Mon, 25 Feb 2019 12:20:24 +0000 (15:20 +0300)
bin/PortManager.py

index 9eb6e7ebd2bf20f0dfaa52ed3dc6df501991a728..d0ba1b91347da84318f0e88c56d1a7b525fe9954 100644 (file)
@@ -100,7 +100,7 @@ def __isNetworkConnectionActiveOnPort(port):
   #        netstat options -l and -t are unavailable
   #        grep command is unavailable
   if sys.platform == "win32":
-    cmd = ['netstat','-a','-n','-p tcp']
+    cmd = ['netstat','-a','-n','-p','tcp']
   else:
     cmd = ['netstat','-ant']
     pass
@@ -118,7 +118,7 @@ def __isNetworkConnectionActiveOnPort(port):
     return False
 
   from io import StringIO
-  buf = StringIO(out.decode())
+  buf = StringIO(out.decode('utf-8', 'ignore'))
   ports = buf.readlines()
   # search for TCP - LISTEN connections
   import re