Skip to content

Commit f09d9a0

Browse files
committed
fix: fix egg updater for released packages
1 parent 830ae7a commit f09d9a0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

cve_bin_tool/egg_updater.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
from setuptools import find_packages
1010
from setuptools.dist import Distribution
1111

12-
with open(os.path.join("cve_bin_tool", "version.py")) as f:
13-
for line in f:
14-
if line.startswith("VERSION"):
15-
VERSION = ast.literal_eval(line.strip().split("=")[-1].strip())
16-
break
12+
try:
13+
from cve_bin_tools.version import VERSION
14+
except ModuleNotFoundError:
15+
with open(os.path.join("cve_bin_tool", "version.py")) as f:
16+
for line in f:
17+
if line.startswith("VERSION"):
18+
VERSION = ast.literal_eval(line.strip().split("=")[-1].strip())
19+
break
1720

1821

1922
def IS_DEVELOP() -> bool:

0 commit comments

Comments
 (0)