summaryrefslogtreecommitdiff
path: root/Lib/http/server.py
diff options
context:
space:
mode:
authorGéry Ogam <gery.ogam@gmail.com>2019-09-11 15:03:46 +0200
committerZachary Ware <zachary.ware@gmail.com>2019-09-11 14:03:46 +0100
commit781266ebb60e7ac781a3e07030d92275721ff3cf (patch)
tree8a39e79a64aa7421f2fc0f191ee2c053fa746966 /Lib/http/server.py
parente1d455f3a3b82c2e08d5e133bcbab5a181b66cfb (diff)
downloadcpython-git-781266ebb60e7ac781a3e07030d92275721ff3cf.tar.gz
bpo-35640: Allow passing PathLike arguments to SimpleHTTPRequestHandler (GH-11398)
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r--Lib/http/server.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index b247675ec4..005dd824f9 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -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):