From 329da35b297dc38f3f32198ed1c7e09bbace7c0e Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Tue, 20 Oct 2015 11:02:51 -0400 Subject: [PATCH] 7324: Tighten exception ignoring in run_test_server start_nginx. We just want to make sure the FIFO's gone. Ignore the OSError that says "can't remove it because it's already gone," and re-raise all others. --- sdk/python/tests/run_test_server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py index d5d716684b..87b6f9afb9 100644 --- a/sdk/python/tests/run_test_server.py +++ b/sdk/python/tests/run_test_server.py @@ -3,6 +3,7 @@ from __future__ import print_function import argparse import atexit +import errno import httplib2 import os import pipes @@ -456,8 +457,9 @@ def run_nginx(): try: os.remove(nginxconf['ACCESSLOG']) - except OSError: - pass + except OSError as error: + if error.errno != errno.ENOENT: + raise os.mkfifo(nginxconf['ACCESSLOG'], 0700) nginx = subprocess.Popen( -- 2.39.5