From f0cc3c391e64799ba18e61e069487ca841195093 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Mon, 14 Sep 2020 13:00:45 -0400 Subject: [PATCH] Work around Python bug, appending to a FIFO in python >=3 <3.8 is broken (https://bugs.python.org/issue27805). No issue # Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- sdk/python/tests/run_test_server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py index f4c1230cc8..358608d63c 100644 --- a/sdk/python/tests/run_test_server.py +++ b/sdk/python/tests/run_test_server.py @@ -327,7 +327,10 @@ def run(leave_running_atexit=False): env.pop('ARVADOS_API_HOST', None) env.pop('ARVADOS_API_HOST_INSECURE', None) env.pop('ARVADOS_API_TOKEN', None) - logf = open(_logfilename('railsapi'), 'a') + if not os.environ.get('ARVADOS_DEBUG', ''): + logf = open(_logfilename('railsapi'), 'a') + else: + logf = open(_logfilename('railsapi'), 'w') railsapi = subprocess.Popen( ['bundle', 'exec', 'passenger', 'start', '-p{}'.format(port), -- 2.30.2