changeset 50897:6ca865080479

remotefilelog: use sysstr to access for attributes We do not need bytes here.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 30 Aug 2023 14:07:02 +0200
parents b2b8c25f9462
children 29ce50726ce0
files mercurial/utils/urlutil.py
diffstat 1 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/utils/urlutil.py	Wed Aug 30 13:28:09 2023 +0200
+++ b/mercurial/utils/urlutil.py	Wed Aug 30 14:07:02 2023 +0200
@@ -257,18 +257,20 @@
     def __repr__(self):
         attrs = []
         for a in (
-            b'scheme',
-            b'user',
-            b'passwd',
-            b'host',
-            b'port',
-            b'path',
-            b'query',
-            b'fragment',
+            'scheme',
+            'user',
+            'passwd',
+            'host',
+            'port',
+            'path',
+            'query',
+            'fragment',
         ):
             v = getattr(self, a)
             if v is not None:
-                attrs.append(b'%s: %r' % (a, pycompat.bytestr(v)))
+                line = b'%s: %r'
+                line %= (pycompat.bytestr(a), pycompat.bytestr(v))
+                attrs.append(line)
         return b'<url %s>' % b', '.join(attrs)
 
     def __bytes__(self):