changeset 39824:db875f97a969

py3: un-byteify strings around os.system() and os.devnull in contrib/perf
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 21 Sep 2018 20:28:00 -0400
parents c4ab9fa81377
children 874712506b07
files contrib/perf.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Fri Sep 21 20:16:13 2018 -0400
+++ b/contrib/perf.py	Fri Sep 21 20:28:00 2018 -0400
@@ -921,11 +921,11 @@
     timer, fm = gettimer(ui, opts)
     cmd = sys.argv[0]
     def d():
-        if os.name != b'nt':
+        if os.name != r'nt':
             os.system(b"HGRCPATH= %s version -q > /dev/null" % cmd)
         else:
-            os.environ[b'HGRCPATH'] = b' '
-            os.system(b"%s version -q > NUL" % cmd)
+            os.environ[r'HGRCPATH'] = r' '
+            os.system(r"%s version -q > NUL" % cmd)
     timer(d)
     fm.end()
 
@@ -1059,7 +1059,7 @@
                           hint=b"use 4.3 or later")
 
     nullui = ui.copy()
-    nullui.fout = open(os.devnull, b'wb')
+    nullui.fout = open(os.devnull, r'wb')
     nullui.disablepager()
     revs = opts.get(b'rev')
     if not revs: