From 23eede5fd33501f58770d32ac2f4ba1793339b82 Mon Sep 17 00:00:00 2001
From: Ankush Menat
Date: Mon, 2 Jan 2023 16:03:33 +0530
Subject: [PATCH] fix: version check backward compatibility (#1409)
This code wasn't triggering because VersionNotFound exception gets
thrown before it ever reaches to this point.
---
bench/utils/app.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bench/utils/app.py b/bench/utils/app.py
index 5541b548e..75891d5bf 100644
--- a/bench/utils/app.py
+++ b/bench/utils/app.py
@@ -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")