Skip to content

Commit

Permalink
Add pbr fallback
Browse files Browse the repository at this point in the history
Resolves #1962
  • Loading branch information
Davidy22 committed Nov 1, 2021
1 parent a084a1d commit e195687
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 6 additions & 1 deletion guake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
7 changes: 7 additions & 0 deletions releasenotes/notes/fix_importlib-3da97c56e3fadc21.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e195687

Please sign in to comment.