Skip to content

Commit 1e0390a

Browse files
committed
Check if part exists before trying to delete it (#659)
1 parent 051d18b commit 1e0390a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ changes to the API.
1212
- Strip spaces from QName's when parsing xsd's (#719)
1313
- Fix DateTime parsing when only a date is returned (#672)
1414
- Fix handling of nested optional any elements (#556)
15+
- Check if part exists before trying to delete it (#659)
1516

1617

1718
2.5.0 (2018-01-06)

src/zeep/wsdl/messages/soap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def _resolve_header(self, info, definitions, parts):
364364
part_name = item['part']
365365

366366
message = definitions.get('messages', message_name)
367-
if message == self.abstract:
367+
if message == self.abstract and part_name in parts:
368368
del parts[part_name]
369369

370370
part = message.parts[part_name]

0 commit comments

Comments
 (0)