Skip to content

Commit

Permalink
Modified the __read_qml() function to specify the item we're searchin…
Browse files Browse the repository at this point in the history
…g for.
  • Loading branch information
pierre-manchon committed Aug 26, 2021
1 parent d218708 commit 2d6778a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions INPMT/__utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ def __set_cfg_val(var, value):
print("\n")


def __read_qml(path_qml: AnyStr) -> List:
def __read_qml(path_qml: AnyStr, type: AnyStr) -> List:
xml_data = xml.dom.minidom.parse(path_qml)
legend = []
for item in xml_data.getElementsByTagName("item"):
for item in xml_data.getElementsByTagName(type):
legend.append([item.getAttribute("value"), item.getAttribute("label")])
return legend

0 comments on commit 2d6778a

Please sign in to comment.