Skip to content

Commit

Permalink
Check len of tree elements
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Feb 11, 2018
1 parent a6529c5 commit 3a0c8b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/visualization/plugins/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ class ListParser(list):
"""
def __init__(self, aList):
for element in aList:
if element:
if len(element) > 0:
if len(element) == 1 or element[0].tag != element[1].tag:
self.append(DictParser(element))
elif element[0].tag == element[1].tag:
Expand All @@ -458,7 +458,7 @@ def __init__(self, parent_element):
if parent_element.items():
self.update(dict(parent_element.items()))
for element in parent_element:
if element:
if len(element) > 0:
if len(element) == 1 or element[0].tag != element[1].tag:
aDict = DictParser(element)
else:
Expand Down

0 comments on commit 3a0c8b5

Please sign in to comment.