changeset 43865:578c42f998d9 stable

py3: pass bytes to `configint` and `configbool` Both functions require bytes, even in Python 3. Differential Revision: https://phab.mercurial-scm.org/D7611
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 18 Nov 2019 17:34:44 +0100
parents 37cbf45bb858
children a264e8a91798
files mercurial/dirstate.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Sun Nov 10 07:30:14 2019 -0800
+++ b/mercurial/dirstate.py	Mon Nov 18 17:34:44 2019 +0100
@@ -1119,11 +1119,11 @@
             # Force Rayon (Rust parallelism library) to respect the number of
             # workers. This is a temporary workaround until Rust code knows
             # how to read the config file.
-            numcpus = self._ui.configint("worker", "numcpus")
+            numcpus = self._ui.configint(b"worker", b"numcpus")
             if numcpus is not None:
                 encoding.environ.setdefault(b'RAYON_NUM_THREADS', b'%d' % numcpus)
 
-            workers_enabled = self._ui.configbool("worker", "enabled", True)
+            workers_enabled = self._ui.configbool(b"worker", b"enabled", True)
             if not workers_enabled:
                 encoding.environ[b"RAYON_NUM_THREADS"] = b"1"