py3: pass str in os.sysconf()
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 31 May 2017 23:42:58 +0530
changeset 32611 954489932c4f
parent 32610 bf728e72a219
child 32612 a8262b7784f9
py3: pass str in os.sysconf() os.sysconf() doesn't accepts bytes on Python 3. Adding r'' will make sure b'' is not added here.
mercurial/worker.py
--- a/mercurial/worker.py	Thu May 11 13:59:48 2017 -0700
+++ b/mercurial/worker.py	Wed May 31 23:42:58 2017 +0530
@@ -26,7 +26,7 @@
 
     # posix
     try:
-        n = int(os.sysconf('SC_NPROCESSORS_ONLN'))
+        n = int(os.sysconf(r'SC_NPROCESSORS_ONLN'))
         if n > 0:
             return n
     except (AttributeError, ValueError):