kopia lustrzana https://github.com/micropython/micropython-lib
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>pull/989/head
rodzic
7337e0802a
commit
2d63b4fe93
|
@ -71,6 +71,10 @@ def request(
|
|||
import tls
|
||||
|
||||
port = 443
|
||||
elif proto == "file:":
|
||||
r = Response(open(url[7:], "b"))
|
||||
r.status_code = 200
|
||||
return r
|
||||
else:
|
||||
raise ValueError("Unsupported protocol: " + proto)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue