Skip to content

Commit 6123d6b

Browse files
authored
Make python_server.py compatible to Python 3.7
1 parent ebe55a4 commit 6123d6b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python_files/python_server.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ def get_value(self) -> str:
159159

160160
def get_headers():
161161
headers = {}
162-
while line := STDIN.readline().strip():
162+
while True:
163+
line = STDIN.readline().strip()
164+
if not line:
165+
break
163166
name, value = line.split(":", 1)
164167
headers[name] = value.strip()
165168
return headers

0 commit comments

Comments
 (0)