[meld/build-updates: 8/26] Change warning silencing logic




commit 25f7e544e56104fd673aa301108cb5a6d656a946
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Sep 11 08:08:27 2022 +1000

    Change warning silencing logic
    
    This switches our logic about whether to silence warnings from being
    based on version number to being based on whether we're running from
    Git. Either of these is probably going to be fine for us, but using
    .git has the benefit that it will work even if we change away from the
    odd/even:unstable/stable versioning scheme, and also means that we don't
    need to have `meld.conf` available by the time we do this check.

 bin/meld | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index 44672b82..76b2b528 100755
--- a/bin/meld
+++ b/bin/meld
@@ -93,14 +93,13 @@ if uninstalled:
     meld.conf = mod
     sys.modules['meld.conf'] = mod
 
-import meld.conf  # noqa: E402
-
-# Silence warnings on non-devel releases (minor version is divisible by 2)
-is_stable = not bool(int(meld.conf.__version__.split('.')[1]) % 2)
-if is_stable:
+# Silence warnings if not running from git
+if not devel:
     import warnings
     warnings.simplefilter("ignore")
 
+import meld.conf  # noqa: E402
+
 if uninstalled:
     meld.conf.uninstalled()
 elif frozen:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]