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-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e7194173b9eeeea56509b51e7cdf3bc950699661;p=modules%2Fyacs.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