summaryrefslogtreecommitdiff
path: root/scripts/Util.py
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2017-03-27 16:27:21 +0200
committerJose <jose@zeroc.com>2017-03-27 16:27:21 +0200
commitcd453e40bff9a4f19c64a528f07427e3c61cd17a (patch)
tree60d9e76d6768ebc584b5c9637dada16489740eb4 /scripts/Util.py
parentFix ICE-7679 - Python Application.NoSignalHandling not honor by Ice.Application (diff)
downloadice-cd453e40bff9a4f19c64a528f07427e3c61cd17a.tar.bz2
ice-cd453e40bff9a4f19c64a528f07427e3c61cd17a.tar.xz
ice-cd453e40bff9a4f19c64a528f07427e3c61cd17a.zip
Fixed (ICE-6996) - Python tests warnings when running with python_d debug interpreter on Windows
Diffstat (limited to 'scripts/Util.py')
-rw-r--r--scripts/Util.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/Util.py b/scripts/Util.py
index 9f16bd09d2e..c6b90e20789 100644
--- a/scripts/Util.py
+++ b/scripts/Util.py
@@ -27,6 +27,12 @@ def run(cmd, cwd=None, err=False):
out = p.stdout.read().decode('UTF-8').strip()
if(not err and p.wait() != 0) or (err and p.wait() == 0) :
raise RuntimeError(cmd + " failed:\n" + out)
+ #
+ # Without this we get warnings when runing with python_d on Windows
+ #
+ # ResourceWarning: unclosed file <_io.TextIOWrapper name=3 encoding='cp1252'>
+ #
+ p.stdout.close()
return out
def val(v, escapeQuotes=False, quoteValue=True):