Commit 5021061633a9da140204e8a2403fc041d6b41765
1 parent
3e1cac5a
Replace "raise StopIteration" with "return" (PEP-479)
Showing
1 changed file
with
2 additions
and
2 deletions
oletools/ooxml.py
| ... | ... | @@ -598,11 +598,11 @@ class XmlParser(object): |
| 598 | 598 | logging.warning('Did not iterate through complete file. ' |
| 599 | 599 | 'Should run iter_xml() without args, first.') |
| 600 | 600 | if not self.subfiles_no_xml: |
| 601 | - raise StopIteration() | |
| 601 | + return | |
| 602 | 602 | |
| 603 | 603 | # case of single xml files (office 2003+) |
| 604 | 604 | if self.is_single_xml(): |
| 605 | - raise StopIteration() # "return" | |
| 605 | + return | |
| 606 | 606 | |
| 607 | 607 | content_types, content_defaults = self.get_content_types() |
| 608 | 608 | ... | ... |