summaryrefslogtreecommitdiff
path: root/numpy/distutils/lib2def.py
diff options
context:
space:
mode:
authorÅsmund Hjulstad <asmund@hjulstad.com>2015-02-06 09:20:13 +0100
committerÅsmund Hjulstad <asmund@hjulstad.com>2015-02-06 09:20:13 +0100
commit76bdf3b19b57b46b94da2dc5e53ee9e37e07314e (patch)
treebf50d63bff5481a220489779691552ccb309fa29 /numpy/distutils/lib2def.py
parentb791dde577e18afe8986ec4a85516019a76f447d (diff)
downloadnumpy-76bdf3b19b57b46b94da2dc5e53ee9e37e07314e.tar.gz
Uses universal_newlines option for subprocess.Popen to automatically decode the output. (instead of a subsequent decode step).
Diffstat (limited to 'numpy/distutils/lib2def.py')
-rw-r--r--numpy/distutils/lib2def.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/distutils/lib2def.py b/numpy/distutils/lib2def.py
index 3884ec42a..0a5364566 100644
--- a/numpy/distutils/lib2def.py
+++ b/numpy/distutils/lib2def.py
@@ -66,10 +66,10 @@ def getnm(nm_cmd = ['nm', '-Cs', 'python%s.lib' % py_ver]):
"""Returns the output of nm_cmd via a pipe.
nm_output = getnam(nm_cmd = 'nm -Cs py_lib')"""
- f = subprocess.Popen(nm_cmd, shell=True, stdout=subprocess.PIPE)
+ f = subprocess.Popen(nm_cmd, shell=True, stdout=subprocess.PIPE, universal_newlines=True)
nm_output = f.stdout.read()
f.stdout.close()
- return nm_output.decode('ascii')
+ return nm_output
def parse_nm(nm_output):
"""Returns a tuple of lists: dlist for the list of data