mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
bpo-35640: Allow passing PathLike arguments to SimpleHTTPRequestHandler (GH-11398)
This commit is contained in:
parent
e1d455f3a3
commit
781266ebb6
4 changed files with 80 additions and 24 deletions
|
|
@ -642,7 +642,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
|
|||
def __init__(self, *args, directory=None, **kwargs):
|
||||
if directory is None:
|
||||
directory = os.getcwd()
|
||||
self.directory = directory
|
||||
self.directory = os.fspath(directory)
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def do_GET(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue