Skip to content
Snippets Groups Projects
Commit 0e8b7664 authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

py3: convert os.devnull to bytes using pycompat.bytestr

os.devnull returns str on Python 3.

Differential Revision: https://phab.mercurial-scm.org/D2477
parent 9ff5cbfb
Branches
Tags
No related merge requests found
......@@ -339,7 +339,7 @@
pass
cmdline = [util.shellquote(arg) for arg in cmdline]
if not self.ui.debugflag:
cmdline += ['2>', os.devnull]
cmdline += ['2>', pycompat.bytestr(os.devnull)]
cmdline = ' '.join(cmdline)
return cmdline
......
......@@ -316,7 +316,7 @@
# Work around "popen spawned process may not write to stdout
# under windows"
# http://bugs.python.org/issue1366
command += " 2> %s" % os.devnull
command += " 2> %s" % pycompat.bytestr(os.devnull)
return os.popen(quotecommand(command), mode)
def explainexit(code):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment