diff --git a/mercurial/extensions.py b/mercurial/extensions.py index 9cea55ca117535a092c9e6fb5e0edf1a5a6b6fd4_bWVyY3VyaWFsL2V4dGVuc2lvbnMucHk=..553451522113ee0304835b8005e74695f36d1333_bWVyY3VyaWFsL2V4dGVuc2lvbnMucHk= 100644 --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -930,7 +930,11 @@ def moduleversion(module): '''return version information from given module as a string''' if util.safehasattr(module, b'getversion') and callable(module.getversion): - version = module.getversion() + try: + version = module.getversion() + except Exception: + version = b'unknown' + elif util.safehasattr(module, b'__version__'): version = module.__version__ else: