From 520a96a0324a2470ac64d867d56ded2bd2ea6b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9cile=20Vuilleumier?= Date: Tue, 18 Nov 2025 15:13:34 +0100 Subject: [PATCH] Fix FutureWarning when truth-testing XML element --- owslib/wmts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/owslib/wmts.py b/owslib/wmts.py index b7655283..a7ce896b 100644 --- a/owslib/wmts.py +++ b/owslib/wmts.py @@ -859,7 +859,7 @@ def __init__(self, elem, parent=None, index=0, parse_remote_metadata=False): dimension['default'] = default_value.text current = dim.find(_DIMENSION_CURRENT_TAG) - if current and current.text == 'true': + if current is not None and current.text == 'true': dimension['current'] = True else: dimension['current'] = False