Skip to content

Commit

Permalink
Check location for circular-importing xsd schemas.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreif committed Mar 1, 2016
1 parent 25f9f91 commit ba82597
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions suds/xsd/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,11 @@ def open_imports(self, options):
@type options: L{options.Options}
"""
for imp in self.imports:
self.__already_imported.setdefault(imp.location, 0)
if self.__already_imported[imp.location] > 1:
continue
self.__already_imported[imp.location] += 1
if imp.location:
self.__already_imported.setdefault(imp.location, 0)
if self.__already_imported[imp.location] > 1:
continue
self.__already_imported[imp.location] += 1

imported = imp.open(options)
if imported is None:
Expand Down

0 comments on commit ba82597

Please sign in to comment.