mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
fix deprecation warning
if macros copy is actually an `Element` then this gives a deprecation warning: xml_macros.py:41: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if macros_copy:
This commit is contained in:
@@ -38,7 +38,7 @@ def load_with_references(path):
|
||||
|
||||
# readd the stashed children of the macros node
|
||||
# TODO is this this really necesary? Since macro nodes are removed anyway just below.
|
||||
if macros_copy:
|
||||
if macros_copy is not None:
|
||||
_xml_set_children(macros_el, list(macros_copy))
|
||||
|
||||
for el in root.xpath('//macro'):
|
||||
|
||||
Reference in New Issue
Block a user