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,11 +598,11 @@ class XmlParser(object): | ||
| 598 | logging.warning('Did not iterate through complete file. ' | 598 | logging.warning('Did not iterate through complete file. ' |
| 599 | 'Should run iter_xml() without args, first.') | 599 | 'Should run iter_xml() without args, first.') |
| 600 | if not self.subfiles_no_xml: | 600 | if not self.subfiles_no_xml: |
| 601 | - raise StopIteration() | 601 | + return |
| 602 | 602 | ||
| 603 | # case of single xml files (office 2003+) | 603 | # case of single xml files (office 2003+) |
| 604 | if self.is_single_xml(): | 604 | if self.is_single_xml(): |
| 605 | - raise StopIteration() # "return" | 605 | + return |
| 606 | 606 | ||
| 607 | content_types, content_defaults = self.get_content_types() | 607 | content_types, content_defaults = self.get_content_types() |
| 608 | 608 |