Skip to content

Commit

Permalink
Merge pull request dlenski#3 from mattvchandler/master
Browse files Browse the repository at this point in the history
replace deprecated getchildren()
  • Loading branch information
dlenski authored Dec 15, 2020
2 parents 8597c02 + 9cfe464 commit e5750b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions motoflash2sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def main():

md5sums = {}
sha1sums = {}
for step in steps.getchildren():
for step in steps:
assert step.tag == 'step'
if 'MD5' in step.keys() and 'filename' in step.keys():
md5sums[step.get('filename')] = step.get('MD5')
Expand All @@ -64,7 +64,7 @@ def main():
checksums = checker + ' --check <<EOF || exit 1\n' + ''.join('{1} *{0}\n'.format(*p) for p in checksums.items()) + 'EOF'
args.output.write((checksums if args.verify else commentify(checksums)) + '\n\n')

for nn, step in enumerate(steps.getchildren()):
for nn, step in enumerate(steps):
assert step.tag == 'step'
op = step.get('operation')
if op=='flash':
Expand Down

0 comments on commit e5750b6

Please sign in to comment.