Skip to content

Commit 2e03b3d

Browse files
author
peterstone2017
committed
fix host out readlines
1 parent 2e00ec1 commit 2e03b3d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

azure_functions_worker/testutils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,11 @@ def start_webhost(*, script_dir=None, stdout=None):
899899

900900
addr = f'http://{LOCALHOST}:{port}'
901901
health_check_endpoint = f'{addr}/api/ping'
902-
host_out = stdout.readlines(100)
902+
host_out = ""
903+
if stdout is not None and hasattr(stdout,
904+
"readable") and stdout.readable():
905+
host_out = stdout.readlines(100)
906+
903907
for _ in range(5):
904908
try:
905909
r = requests.get(health_check_endpoint,

0 commit comments

Comments
 (0)