Skip to content

Commit

Permalink
Fixes deprecated .getiterator()
Browse files Browse the repository at this point in the history
  • Loading branch information
jessbade committed Jan 5, 2023
1 parent 52c155a commit 1e13cde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymzml/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def __init__(self):
def _read_accessions(self):
"""Set all required variables for this spectrum."""
self.accessions = {}
for element in self.element.getiterator():
for element in self.element.iter():
accession = element.get("accession")
name = element.get("name")
if accession is not None:
Expand Down Expand Up @@ -1310,7 +1310,7 @@ def _set_params_from_reference_group(self, ref_element):
ref = ref.get("ref")
ele = ref_element.find(".//*[@id='{ref}']".format(ref=ref, ns=self.ns))
if ele is not None and ref == ele.get("id"):
for param in ele.getiterator():
for param in ele.iter():
self.element.append(ele)
acc = param.get("accession")

Expand Down

0 comments on commit 1e13cde

Please sign in to comment.