diff --git a/guake/__init__.py b/guake/__init__.py index 737f78c9f..ba98381e2 100644 --- a/guake/__init__.py +++ b/guake/__init__.py @@ -27,7 +27,12 @@ def guake_version(): try: import importlib.metadata as importlib_metadata except ImportError: - import importlib_metadata + try: + import importlib_metadata + except ImportError: + import pbr.version # Fallback for python < 3.8 unable to install importlib_metadata + + return pbr.version.VersionInfo("guake").version_string() return importlib_metadata.version("guake") diff --git a/releasenotes/notes/fix_importlib-3da97c56e3fadc21.yaml b/releasenotes/notes/fix_importlib-3da97c56e3fadc21.yaml new file mode 100644 index 000000000..d6045b5f6 --- /dev/null +++ b/releasenotes/notes/fix_importlib-3da97c56e3fadc21.yaml @@ -0,0 +1,7 @@ +release_summary: > + Add fallback for version number finding + + +fixes: + - | + - Guake suddenly not starting any more due to ModuleNotFoundError: No module named 'importlib_metadata' #1962