aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/tools/serve/serve.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/web-platform-tests/tools/serve/serve.py')
-rw-r--r--tests/wpt/web-platform-tests/tools/serve/serve.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/wpt/web-platform-tests/tools/serve/serve.py b/tests/wpt/web-platform-tests/tools/serve/serve.py
index 83ef4a327bc..a7bb3cb4a42 100644
--- a/tests/wpt/web-platform-tests/tools/serve/serve.py
+++ b/tests/wpt/web-platform-tests/tools/serve/serve.py
@@ -5,8 +5,8 @@ from __future__ import print_function
import abc
import argparse
import json
+import logging
import os
-import re
import socket
import sys
import threading
@@ -18,8 +18,8 @@ from collections import defaultdict, OrderedDict
from multiprocessing import Process, Event
from localpaths import repo_root
+from six.moves import reload_module
-import sslutils
from manifest.sourcefile import read_script_metadata, js_meta_re, parse_variants
from wptserve import server as wptserve, handlers
from wptserve import stash
@@ -29,6 +29,7 @@ from wptserve.handlers import filesystem_path, wrap_pipeline
from wptserve.utils import get_port, HTTPException
from mod_pywebsocket import standalone as pywebsocket
+
def replace_end(s, old, new):
"""
Given a string `s` that ends with `old`, replace that occurrence of `old`
@@ -565,6 +566,9 @@ class WebSocketDaemon(object):
def start_ws_server(host, port, paths, routes, bind_address, config, ssl_config,
**kwargs):
+ # Ensure that when we start this in a new process we don't inherit the
+ # global lock in the logging module
+ reload_module(logging)
return WebSocketDaemon(host,
str(port),
repo_root,
@@ -576,6 +580,9 @@ def start_ws_server(host, port, paths, routes, bind_address, config, ssl_config,
def start_wss_server(host, port, paths, routes, bind_address, config, ssl_config,
**kwargs):
+ # Ensure that when we start this in a new process we don't inherit the
+ # global lock in the logging module
+ reload_module(logging)
return WebSocketDaemon(host,
str(port),
repo_root,