PY3 pure build fix some str/bytes wobblies
authorNoel Power <noel.power@suse.com>
Sat, 24 Nov 2018 15:27:21 +0000 (15:27 +0000)
committerNoel Power <npower@samba.org>
Mon, 10 Dec 2018 09:38:24 +0000 (10:38 +0100)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_dist.py

index 0568403..c3144e9 100644 (file)
@@ -97,7 +97,7 @@ def add_tarfile(tar, fname, abspath, basedir):
     tinfo.gid   = 0
     tinfo.uname = 'root'
     tinfo.gname = 'root'
-    fh = open(abspath)
+    fh = open(abspath, "rb")
     tar.addfile(tinfo, fileobj=fh)
     fh.close()
 
@@ -119,7 +119,7 @@ def vcs_dir_contents(path):
         repo = os.path.dirname(repo)
     if repo == "/":
         raise Exception("unsupported or no vcs for %s" % path)
-    return Utils.cmd_output(ls_files_cmd, cwd=cwd, env=env).split('\n')
+    return Utils.cmd_output(ls_files_cmd, cwd=cwd, env=env).decode('utf8').split('\n')
 
 
 def dist(appname='', version=''):