10BC0 Small code contraction · SpotlightKid/micropython-stm-lib@c178037 · GitHub
[go: up one dir, main page]

Skip to content

Commit c178037

Browse files
committed
Small code contraction
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
1 parent 849e922 commit c178037

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

mrequests/mrequests.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,7 @@ def request(
290290
else:
291291
sock = ssl.wrap_socket(sock, server_hostname=ctx.host)
292292

293-
if not MICROPY:
294-
sf = sock.makefile("rwb")
295-
else:
296-
sf = sock
297-
293+
sf = sock if MICROPY else sock.makefile("rwb")
298294
sf.write(b"%s %s HTTP/1.1\r\n" % (ctx.method.encode("ascii"), ctx.path.encode("ascii")))
299295

300296
if not b"Host" in headers:

0 commit comments

Comments
 (0)
0