diff options
author | Géry Ogam <gery.ogam@gmail.com> | 2019-09-11 13:03:46 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2019-09-11 13:03:46 (GMT) |
commit | 781266ebb60e7ac781a3e07030d92275721ff3cf (patch) | |
tree | 8a39e79a64aa7421f2fc0f191ee2c053fa746966 /Lib/http | |
parent | e1d455f3a3b82c2e08d5e133bcbab5a181b66cfb (diff) | |
download | cpython-781266ebb60e7ac781a3e07030d92275721ff3cf.zip cpython-781266ebb60e7ac781a3e07030d92275721ff3cf.tar.gz cpython-781266ebb60e7ac781a3e07030d92275721ff3cf.tar.bz2 |
bpo-35640: Allow passing PathLike arguments to SimpleHTTPRequestHandler (GH-11398)
Diffstat (limited to 'Lib/http')
-rw-r--r-- | Lib/http/server.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py index b247675..005dd82 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): |