mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
tools: fix deprecated syntax.
This fixes a similar deprecation warning on various pieces of code: > 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. > samples = log.find ("samples") or empty_element
This commit is contained in:
parent
05c86dad8a
commit
1726a6f89f
5 changed files with 27 additions and 23 deletions
|
@ -32,7 +32,7 @@ log = ElementTree.fromstring (sys.stdin.buffer.read ())
|
|||
|
||||
address_map = log.find ("address-map")
|
||||
|
||||
if address_map:
|
||||
if address_map is not None:
|
||||
addresses = []
|
||||
|
||||
# Create base addresses dictionary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue