From 25106812f7df1d898081618f16d851c3c481ce5f Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 14 Jan 2019 14:10:01 +0300 Subject: [PATCH] Integration of the "23656: [CEA] Path for PortManager.py for Windows platform" issue. --- bin/PortManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2