Skip to content

Commit 1d746ae

Browse files
committed
Don't try to import wsdl files which have no location
1 parent cb61df7 commit 1d746ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/zeep/wsdl/wsdl.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,14 @@ def parse_imports(self, doc):
255255
for import_node in doc.findall("wsdl:import", namespaces=NSMAP):
256256
namespace = import_node.get('namespace')
257257
location = import_node.get('location')
258-
location = absolute_location(location, self.location)
259258

259+
if not location:
260+
logger.debug(
261+
"Skipping import for namespace %s (empty location)",
262+
namespace)
263+
continue
264+
265+
location = absolute_location(location, self.location)
260266
key = (namespace, location)
261267
if key in self.wsdl._definitions:
262268
self.imports[key] = self.wsdl._definitions[key]

0 commit comments

Comments
 (0)