Patchwork D7062: convert: convert os.devnull to bytes before trying to join it with other bytes

login
register
mail settings
Submitter phabricator
Date Oct. 17, 2019, 1:52 a.m.
Message ID <72bf02f9a48e2ece50dbdf853226b3e7@localhost.localdomain>
Download mbox | patch
Permalink /patch/42447/
State Not Applicable
Headers show

Comments

phabricator - Oct. 17, 2019, 1:52 a.m.
Closed by commit rHG6ef48274e803: convert: convert os.devnull to bytes before trying to join it with other bytes (authored by Kwan).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7062?vs=17069&id=17281

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7062/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7062

AFFECTED FILES
  hgext/convert/gnuarch.py

CHANGE DETAILS




To: Kwan, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

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 @@ 
         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))