mq: use sysstr to check for attribute access
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 31 Aug 2023 16:57:16 +0200
changeset 50902 defd2b3eafdb
parent 50901 6543469a351e
child 50903 e054898624db
mq: use sysstr to check for attribute access We do not need bytes here.
mercurial/chgserver.py
--- a/mercurial/chgserver.py	Wed Aug 30 12:51:27 2023 +0200
+++ b/mercurial/chgserver.py	Thu Aug 31 16:57:16 2023 +0200
@@ -260,7 +260,7 @@
     from . import dispatch  # avoid cycle
 
     newui = srcui.__class__.load()
-    for a in [b'fin', b'fout', b'ferr', b'environ']:
+    for a in ['fin', 'fout', 'ferr', 'environ']:
         setattr(newui, a, getattr(srcui, a))
     if util.safehasattr(srcui, '_csystem'):
         newui._csystem = srcui._csystem
@@ -348,9 +348,9 @@
 
 _iochannels = [
     # server.ch, ui.fp, mode
-    (b'cin', b'fin', 'rb'),
-    (b'cout', b'fout', 'wb'),
-    (b'cerr', b'ferr', 'wb'),
+    ('cin', 'fin', 'rb'),
+    ('cout', 'fout', 'wb'),
+    ('cerr', 'ferr', 'wb'),
 ]