From: rnv Date: Mon, 14 Jan 2019 11:10:01 +0000 (+0300) Subject: Integration of the "23656: [CEA] Path for PortManager.py for Windows platform" issue. X-Git-Tag: V9_3_0a1~5^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=25106812f7df1d898081618f16d851c3c481ce5f;p=modules%2Fkernel.git Integration of the "23656: [CEA] Path for PortManager.py for Windows platform" issue. --- diff --git a/bin/PortManager.py b/bin/PortManager.py index 9eb6e7ebd..d0ba1b913 100644 --- a/bin/PortManager.py +++ b/bin/PortManager.py @@ -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