From 5021061633a9da140204e8a2403fc041d6b41765 Mon Sep 17 00:00:00 2001 From: Sebastian Willenborg Date: Tue, 28 Aug 2018 22:10:32 +0200 Subject: [PATCH] Replace "raise StopIteration" with "return" (PEP-479) --- oletools/ooxml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oletools/ooxml.py b/oletools/ooxml.py index 2ec1ba2..5250ae3 100644 --- a/oletools/ooxml.py +++ b/oletools/ooxml.py @@ -598,11 +598,11 @@ class XmlParser(object): logging.warning('Did not iterate through complete file. ' 'Should run iter_xml() without args, first.') if not self.subfiles_no_xml: - raise StopIteration() + return # case of single xml files (office 2003+) if self.is_single_xml(): - raise StopIteration() # "return" + return content_types, content_defaults = self.get_content_types() -- libgit2 0.21.4