Philipp Hörist pushed to branch gtk4 at gajim / gajim


Commits:
fb35e1d7 by mesonium at 2024-11-05T15:56:34+01:00
Fix deprecation warning

DeprecationWarning: Testing an element's truth value will always return 
True in future versions.  Use specific 'len(elem)' or 'elem is not 
None' test instead.
  if tree.find('template'):

- - - - -


1 changed file:

- scripts/generate_ui_types.py


Changes:

=====================================
scripts/generate_ui_types.py
=====================================
@@ -76,7 +76,7 @@ def parse(path: Path, file: TextIOWrapper) -> str:
     log.info('Read %s', path)
     lines: list[str] = []
     tree = ElementTree.parse(path)
-    if tree.find('template'):
+    if tree.find('template') is not None:
         raise InvalidFile
 
     for node in tree.iter(tag='object'):



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/fb35e1d7118c90dca438782dd78490006f0a608e

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/fb35e1d7118c90dca438782dd78490006f0a608e
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to