Skip to content

Commit 7494593

Browse files
Set default in seek getattr
Co-authored-by: Nate Prewitt <[email protected]>
1 parent 73dedb1 commit 7494593

File tree

1 file changed

+2
-1
lines changed
  • codegen/smithy-python-codegen/src/main/java/software/amazon/smithy/python/codegen

1 file changed

+2
-1
lines changed

codegen/smithy-python-codegen/src/main/java/software/amazon/smithy/python/codegen/ClientGenerator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ async def _handle_execution(
334334
except SmithyRetryException:
335335
raise context_with_response.response
336336
await sleep(retry_token.retry_delay)
337-
if (seek := getattr(context_with_transport_request.transport_request.body, "seek")) is not None:
337+
current_body = context_with_transport_request.transport_request.body
338+
if (seek := getattr(current_body, "seek", None)) is not None:
338339
await seek(0)
339340
else:
340341
# Step 8: Invoke record_success

0 commit comments

Comments
 (0)