changeset 50894:f75fd677cc05

extensions: use sysstr to check for attribute presence We do not need bytes here.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 30 Aug 2023 13:02:43 +0200
parents 0e936b950731
children a834ec41f17c
files mercurial/extensions.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/extensions.py	Wed Aug 30 13:00:14 2023 +0200
+++ b/mercurial/extensions.py	Wed Aug 30 13:02:43 2023 +0200
@@ -986,13 +986,13 @@
 
 def moduleversion(module):
     '''return version information from given module as a string'''
-    if util.safehasattr(module, b'getversion') and callable(module.getversion):
+    if util.safehasattr(module, 'getversion') and callable(module.getversion):
         try:
             version = module.getversion()
         except Exception:
             version = b'unknown'
 
-    elif util.safehasattr(module, b'__version__'):
+    elif util.safehasattr(module, '__version__'):
         version = module.__version__
     else:
         version = b''