From 84f324a6d4846a61a9ac8c1a4a933a9f16d79b54 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sat, 10 Mar 2012 14:38:52 -0700 Subject: PY3: Fix FindDependenciesLdd "ResourceWarning: unclosed file". --- numpy/linalg/tests/test_build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/numpy/linalg/tests/test_build.py b/numpy/linalg/tests/test_build.py index e9d52c876..691fd7a6b 100644 --- a/numpy/linalg/tests/test_build.py +++ b/numpy/linalg/tests/test_build.py @@ -13,7 +13,8 @@ class FindDependenciesLdd(object): self.cmd = ['ldd'] try: - st = call(self.cmd, stdout=PIPE, stderr=PIPE) + p = Popen(self.cmd, stdout=PIPE, stderr=PIPE) + stdout, stderr = p.communicate() except OSError: raise RuntimeError("command %s cannot be run" % self.cmd) -- cgit v1.2.1