aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/wrap
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-07-08 11:50:51 -0700
committerEli Schwartz <eschwartz93@gmail.com>2023-01-03 14:49:02 -0500
commit0a873f6470bf4e621f1ce2eeb250b5f5b918ac63 (patch)
tree59c1dceeb4c0acbce7423fac2dca75659dc55c58 /mesonbuild/wrap
parent8f9c6c10c4ec1fffd48a255320f4cbbb67496033 (diff)
downloadmeson-0a873f6470bf4e621f1ce2eeb250b5f5b918ac63.zip
meson-0a873f6470bf4e621f1ce2eeb250b5f5b918ac63.tar.gz
meson-0a873f6470bf4e621f1ce2eeb250b5f5b918ac63.tar.bz2
wrap: use log once instead of hand rolling
Diffstat (limited to 'mesonbuild/wrap')
-rw-r--r--mesonbuild/wrap/wrap.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index d949f43..076c7c8 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -54,7 +54,6 @@ except ImportError:
has_ssl = False
REQ_TIMEOUT = 600.0
-SSL_WARNING_PRINTED = False
WHITELIST_SUBDOMAIN = 'wrapdb.mesonbuild.com'
ALL_TYPES = ['file', 'git', 'hg', 'svn']
@@ -95,10 +94,7 @@ def open_wrapdburl(urlstring: str, allow_insecure: bool = False, have_opt: bool
raise WrapException(f'SSL module not available in {sys.executable}: Cannot contact the WrapDB.{insecure_msg}')
else:
# following code is only for those without Python SSL
- global SSL_WARNING_PRINTED # pylint: disable=global-statement
- if not SSL_WARNING_PRINTED:
- mlog.warning(f'SSL module not available in {sys.executable}: WrapDB traffic not authenticated.')
- SSL_WARNING_PRINTED = True
+ mlog.warning(f'SSL module not available in {sys.executable}: WrapDB traffic not authenticated.', once=True)
# If we got this far, allow_insecure was manually passed
nossl_url = url._replace(scheme='http')