[seahorse] meson: Fix gpg_check_version.py to compare integers rather than strings
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse] meson: Fix gpg_check_version.py to compare integers rather than strings
- Date: Fri, 15 Dec 2017 21:41:19 +0000 (UTC)
commit 6cbfd2b328218fc87411f7d40303c96328e1e504
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Dec 15 22:40:08 2017 +0100
meson: Fix gpg_check_version.py to compare integers rather than strings
meson/gpg_check_version.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meson/gpg_check_version.py b/meson/gpg_check_version.py
index b3481b3..54d3871 100755
--- a/meson/gpg_check_version.py
+++ b/meson/gpg_check_version.py
@@ -16,9 +16,9 @@ def check_version(gpg_version, accepted_version, is_gpgme = False):
gpg_major, gpg_minor, gpg_micro = gpg_version.split('.', 2)
acc_major, acc_minor, acc_micro = accepted_version.split('.', 2)
if is_gpgme:
- return gpg_major == acc_major and gpg_minor >= acc_minor and gpg_micro >= acc_micro
+ return int(gpg_major) == int(acc_major) and int(gpg_minor) >= int(acc_minor) and int(gpg_micro) >=
int(acc_micro)
else:
- return gpg_major == acc_major and gpg_minor == acc_minor and gpg_micro >= acc_micro
+ return int(gpg_major) == int(acc_major) and int(gpg_minor) == int(acc_minor) and int(gpg_micro) >=
int(acc_micro)
if len(sys.argv) <= 3:
sys.exit(1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]