File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -736,16 +736,13 @@ async def write_eof(self, data: bytes = b"") -> None:
736
736
assert not data , f"data arg is not supported, got { data !r} "
737
737
assert self ._req is not None
738
738
assert self ._payload_writer is not None
739
- if body is not None :
740
- if self ._must_be_empty_body :
741
- await super ().write_eof ()
742
- elif isinstance (self ._body , Payload ):
743
- await self ._body .write (self ._payload_writer )
744
- await super ().write_eof ()
745
- else :
746
- await super ().write_eof (cast (bytes , body ))
747
- else :
739
+ if body is None or self ._must_be_empty_body :
748
740
await super ().write_eof ()
741
+ elif isinstance (self ._body , Payload ):
742
+ await self ._body .write (self ._payload_writer )
743
+ await super ().write_eof ()
744
+ else :
745
+ await super ().write_eof (cast (bytes , body ))
749
746
750
747
async def _start (self , request : "BaseRequest" ) -> AbstractStreamWriter :
751
748
if hdrs .CONTENT_LENGTH in self ._headers :
You can’t perform that action at this time.
0 commit comments