From 2d6778a93817721c0b0cce2b9ca67237844a8dbf Mon Sep 17 00:00:00 2001 From: Pierre Manchon Date: Thu, 26 Aug 2021 15:11:22 +0200 Subject: [PATCH] Modified the __read_qml() function to specify the item we're searching for. --- INPMT/__utils/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INPMT/__utils/utils.py b/INPMT/__utils/utils.py index b5701f0..b68119e 100644 --- a/INPMT/__utils/utils.py +++ b/INPMT/__utils/utils.py @@ -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