Skip to content

Commit

Permalink
fix: remove call to deprecated Element.getchildren
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Feb 1, 2022
1 parent 62a76e5 commit 737498b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
0.11.0
- feat: implement FDTD/Meep reader for data from ODTbrain paper
- fix: remove call to deprecated Element.getchildren
- setup: bump qpimage from 0.6.2 to 0.7.4 (new metadata keys)
0.10.9
- ref: minor code cleanup
Expand Down
13 changes: 6 additions & 7 deletions qpformat/file_formats/single_tif_phasics.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,12 @@ def _get_meta_data(path, section, name):
meta = meta.replace("\\n", "\n")
meta = meta.replace("\\r", "")
root = ET.fromstring("<root>\n" + meta + "</root>")
for phadata in root.getchildren():
for cluster in phadata.getchildren():
sec = cluster.getchildren()[0].text
for child in cluster.getchildren():
gchild = child.getchildren()
if len(gchild) == 2:
nm, val = gchild
for phadata in root:
for cluster in phadata:
sec = cluster[0].text
for child in cluster:
if len(child) == 2:
nm, val = child
# print(sec, nm.text, val.text)
if (sec.lower() == section and
nm.text.lower() == name):
Expand Down

0 comments on commit 737498b

Please sign in to comment.