2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-13 16:56:33 +00:00

fix: version check backward compatibility (#1409)

This code wasn't triggering because VersionNotFound exception gets
thrown before it ever reaches to this point.
This commit is contained in:
Ankush Menat 2023-01-02 16:03:33 +05:30 committed by GitHub
parent ba853c943b
commit 23eede5fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,7 +284,7 @@ def get_current_version(app, bench_path="."):
with open(init_path) as f:
current_version = get_version_from_string(f.read())
except AttributeError:
except (AttributeError, VersionNotFound):
# backward compatibility
with open(setup_path) as f:
current_version = get_version_from_string(f.read(), field="version")