# HG changeset patch # User Ian Moody # Date 2019-10-11 17:08:50 # Node ID 8c0fe77f47c5956681238b79dc15093c92e79395 # Parent 733d4ffcd6675d457b60bafa9568115daebc0661 convert: convert os.devnull to bytes before trying to join it with other bytes Together with the previous commit relating to emailparser this gets test-convert-tla.t passing under py3. Differential Revision: https://phab.mercurial-scm.org/D7062 diff --git a/hgext/convert/gnuarch.py b/hgext/convert/gnuarch.py --- a/hgext/convert/gnuarch.py +++ b/hgext/convert/gnuarch.py @@ -216,7 +216,8 @@ class gnuarch_source(common.converter_so cmdline = [self.execmd, cmd] cmdline += args cmdline = [procutil.shellquote(arg) for arg in cmdline] - cmdline += [b'>', os.devnull, b'2>', os.devnull] + bdevnull = pycompat.bytestr(os.devnull) + cmdline += [b'>', bdevnull, b'2>', bdevnull] cmdline = procutil.quotecommand(b' '.join(cmdline)) self.ui.debug(cmdline, b'\n') return os.system(pycompat.rapply(procutil.tonativestr, cmdline))