changeset 43275:8c0fe77f47c5

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
author Ian Moody <moz-ian@perix.co.uk>
date Fri, 11 Oct 2019 18:08:50 +0100
parents 733d4ffcd667
children d201a637c971
files hgext/convert/gnuarch.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/gnuarch.py	Wed Oct 16 20:34:56 2019 +0200
+++ b/hgext/convert/gnuarch.py	Fri Oct 11 18:08:50 2019 +0100
@@ -216,7 +216,8 @@
         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))