Control: tags -1 + patch

Hello,

The attached patch cherry-picks upstream commit 1a532e3 ("chore(src):
Address xml deprecation warning", first released in v0.9) into
debian/patches, fixing the DeprecationWarning emitted at
/usr/bin/wsdd:649 during metadata exchange.

I have also opened a merge request on Salsa:
https://salsa.debian.org/grantma/wsdd/-/merge_requests/8

The patch applies cleanly to 2:0.8-5 and the package builds
successfully with it, including the build-time regression tests.

Tested on 2:0.8-5 (sid source, bookworm + backports debhelper):
- patch applies cleanly with quilt (no fuzz/offset)
- dpkg-buildpackage succeeds incl. build-time regression tests
- python3 -m py_compile passes on the patched src/wsdd.py
- no new lintian findings attributable to the change

Regards,
Ramanuj
From: Alessandro Astone <[email protected]>
Date: Tue, 7 Jul 2026 17:29:52 +0530
Subject: Fix deprecated Element truth value test

Testing an ElementTree Element for truth is deprecated in Python and
wsdd warns at runtime (/usr/bin/wsdd:649). Use "is not None" instead.

Origin: upstream, https://github.com/christgau/wsdd/commit/1a532e3ee12c92e4a83d6104a23bcad0656a2f27
Bug-Debian: https://bugs.debian.org/1117986
Applied-Upstream: v0.9
Last-Update: 2026-07-07
---
 src/wsdd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wsdd.py b/src/wsdd.py
index 085e868..ec815a0 100755
--- a/src/wsdd.py
+++ b/src/wsdd.py
@@ -646,7 +646,7 @@ class WSDDiscoveredDevice:
             elif dialect == WSDP_URI + '/Relationship':
                 host_xpath = 'wsdp:Relationship[@Type="{}/host"]/wsdp:Host'.format(WSDP_URI)
                 host_sec = section.find(host_xpath, namespaces)
-                if (host_sec):
+                if (host_sec is not None):
                     self.extract_host_props(host_sec)
             else:
                 logger.debug('unknown metadata dialect ({})'.format(dialect))

Reply via email to