Content-Length: 250087 | pFad | http://github.com/micropython/micropython-lib/commit/87985ad584cf99f3aeeceab617dc80a04d4f40f6

A2 requests: Support file:// scheme for local files. · micropython/micropython-lib@87985ad · GitHub
Skip to content

Commit 87985ad

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 87985ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python-ecosys/requests/requests/__init__.py

+4
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/micropython/micropython-lib/commit/87985ad584cf99f3aeeceab617dc80a04d4f40f6

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy