mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #12167: Fix a reafleak in packaging.tests.PyPIServer constructor
Don't modify mutable default arguments...
This commit is contained in:
parent
a1969e0cbf
commit
4e97abce2d
1 changed files with 3 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ class PyPIServer(threading.Thread):
|
|||
"""
|
||||
|
||||
def __init__(self, test_static_path=None,
|
||||
static_filesystem_paths=["default"],
|
||||
static_filesystem_paths=None,
|
||||
static_uri_paths=["simple", "packages"], serve_xmlrpc=False):
|
||||
"""Initialize the server.
|
||||
|
||||
|
|
@ -105,6 +105,8 @@ class PyPIServer(threading.Thread):
|
|||
threading.Thread.__init__(self)
|
||||
self._run = True
|
||||
self._serve_xmlrpc = serve_xmlrpc
|
||||
if static_filesystem_paths is None:
|
||||
static_filesystem_paths = ["default"]
|
||||
|
||||
#TODO allow to serve XMLRPC and HTTP static files at the same time.
|
||||
if not self._serve_xmlrpc:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue