Skip to content

Commit 2d63b4f

Browse files
committed
requests: Support file:// scheme for local files.
This allows installing packages using mip from an index served from the local fs. Signed-off-by: Dominik Heidler <dheidler@suse.de>
1 parent 7337e08 commit 2d63b4f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python-ecosys/requests/requests/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ def request(
7171
import tls
7272

7373
port = 443
74+
elif proto == "file:":
75+
r = Response(open(url[7:], "b"))
76+
r.status_code = 200
77+
return r
7478
else:
7579
raise ValueError("Unsupported protocol: " + proto)
7680

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy