From: Ward Vandewege Date: Mon, 14 Sep 2020 17:00:45 +0000 (-0400) Subject: Work around Python bug, appending to a FIFO in python >=3 <3.8 is broken X-Git-Tag: 2.1.0~66 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/f0cc3c391e64799ba18e61e069487ca841195093 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 --- 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),