Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Shakemap
shakyground2
Commits
cfc499e3
Commit
cfc499e3
authored
Apr 28, 2021
by
g-weatherill
Browse files
Edits tag index to find compatible solution for both flake8 and black
parent
c02afb5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
shakyground2/import_fdsnws_eq.py
View file @
cfc499e3
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment