15 lines
447 B
Diff
15 lines
447 B
Diff
|
--- src/binwalk/core/version.py.orig
|
||
|
+++ src/binwalk/core/version.py
|
||
|
@@ -1,6 +1,10 @@
|
||
|
try:
|
||
|
from importlib import metadata
|
||
|
- get_version = lambda : metadata.version("binwalk")
|
||
|
+ def get_version():
|
||
|
+ try:
|
||
|
+ return metadata.version("binwalk")
|
||
|
+ except metadata.PackageNotFoundError:
|
||
|
+ return "unknown"
|
||
|
except ImportError:
|
||
|
try:
|
||
|
# Running on pre-3.8 Python; use importlib-metadata package
|