changeset 32611:954489932c4f

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.
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 31 May 2017 23:42:58 +0530
parents bf728e72a219
children a8262b7784f9
files mercurial/worker.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):