py3: add missing b'' prefixes in tests/badserverext.py
authorPulkit Goyal <pulkit@yandex-team.ru>
Tue, 04 Sep 2018 17:32:09 +0300
changeset 39447 cbfab495dbcf
parent 39446 3694c9aaf5e4
child 39448 7450f6500b6e
py3: add missing b'' prefixes in tests/badserverext.py # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D4456
tests/badserverext.py
--- a/tests/badserverext.py	Tue Sep 04 17:19:30 2018 +0300
+++ b/tests/badserverext.py	Tue Sep 04 17:32:09 2018 +0300
@@ -238,10 +238,10 @@
             self._ui = ui
             super(badserver, self).__init__(ui, *args, **kwargs)
 
-            recvbytes = self._ui.config('badserver', 'closeafterrecvbytes')
+            recvbytes = self._ui.config(b'badserver', b'closeafterrecvbytes')
             recvbytes = recvbytes.split(',')
             self.closeafterrecvbytes = [int(v) for v in recvbytes if v]
-            sendbytes = self._ui.config('badserver', 'closeaftersendbytes')
+            sendbytes = self._ui.config(b'badserver', b'closeaftersendbytes')
             sendbytes = sendbytes.split(',')
             self.closeaftersendbytes = [int(v) for v in sendbytes if v]
 
@@ -261,7 +261,7 @@
 
         # Called to accept() a pending socket.
         def get_request(self):
-            if self._ui.configbool('badserver', 'closebeforeaccept'):
+            if self._ui.configbool(b'badserver', b'closebeforeaccept'):
                 self.socket.close()
 
                 # Tells the server to stop processing more requests.