Commit cfc499e3 authored by g-weatherill's avatar g-weatherill
Browse files

Edits tag index to find compatible solution for both flake8 and black

parent c02afb5d
......@@ -70,7 +70,8 @@ def fetch_fm(root: ET.Element, ns: dict, preferredfmID: str) -> list:
continue
v = found.text
tag = child.tag
tag = tag[tag.index("}") + 1 :]
tag_idx = tag.index("}") + 1
tag = tag[tag_idx:]
try:
d[k][tag] = float(str(v))
except ValueError:
......@@ -114,7 +115,8 @@ def fetch_origin(root, ns: dict, preferredoriginID: str) -> dict:
d = dict()
for child in o:
tag = child.tag
tag = tag[tag.index("}") + 1 :]
tag_idx = tag.index("}") + 1
tag = tag[tag_idx:]
if tag in ("depth", "latitude", "longitude", "time"):
v = child.find("ns:value", ns).text
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment