diff options
author | Joe Guo <joeg@catalyst.net.nz> | 2019-02-15 11:23:17 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-02-18 09:25:21 +0100 |
commit | 4843a27bbc2f2017314ad9508d61ac4c44330e77 (patch) | |
tree | 9d2255d4a031095b618b61661eb1893bec624520 /buildtools/wafsamba/symbols.py | |
parent | 8fc04d2ce314bd246eeac1b8aad2fa1c98049c37 (diff) | |
download | samba-4843a27bbc2f2017314ad9508d61ac4c44330e77.tar.gz |
wafsamba/symbols: always split Popen output by bytes
In py3, `wafsamba.duplicate_symbols` test may fail:
...
elfpipe = subprocess.Popen(['readelf', '--dynamic', binname], stdout=subprocess.PIPE).stdout
...
File "./buildtools/wafsamba/symbols.py", line 153, in get_libs
rpath.extend(m.group(1).split(":"))
TypeError: a bytes-like object is required, not 'str'
Because Popen will always return bytestr even in py3, and ":" is a
unicode str in py3. Change ":" to b":" to fix.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools/wafsamba/symbols.py')
-rw-r--r-- | buildtools/wafsamba/symbols.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/buildtools/wafsamba/symbols.py b/buildtools/wafsamba/symbols.py index 4eab8e4a059..505c0bac7ea 100644 --- a/buildtools/wafsamba/symbols.py +++ b/buildtools/wafsamba/symbols.py @@ -146,7 +146,8 @@ def get_libs(bld, binname): libs.add(m.group(1)) m = re_rpath.search(line) if m: - rpath.extend(m.group(1).split(":")) + # output from Popen is always bytestr even in py3 + rpath.extend(m.group(1).split(b":")) ret = set() for lib in libs: |