convert: use sysstr to check for attribute presence
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 01 Sep 2023 13:08:02 +0200
changeset 50903 e054898624db
parent 50902 defd2b3eafdb
child 50904 9f3e4b60bfe6
convert: use sysstr to check for attribute presence We do not need bytes here.
hgext/convert/transport.py
--- a/hgext/convert/transport.py	Thu Aug 31 16:57:16 2023 +0200
+++ b/hgext/convert/transport.py	Fri Sep 01 13:08:02 2023 +0200
@@ -63,7 +63,7 @@
                 if p:
                     providers.append(p)
     else:
-        if util.safehasattr(svn.client, b'get_windows_simple_provider'):
+        if util.safehasattr(svn.client, 'get_windows_simple_provider'):
             providers.append(svn.client.get_windows_simple_provider(pool))
 
     return svn.core.svn_auth_open(providers, pool)
@@ -85,7 +85,7 @@
         self.password = b''
 
         # Only Subversion 1.4 has reparent()
-        if ra is None or not util.safehasattr(svn.ra, b'reparent'):
+        if ra is None or not util.safehasattr(svn.ra, 'reparent'):
             self.client = svn.client.create_context(self.pool)
             ab = _create_auth_baton(self.pool)
             self.client.auth_baton = ab