extensions: use sysstr to check for attribute presence
We do not need bytes here.
--- 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''