We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3eaf027 commit 20e2b1cCopy full SHA for 20e2b1c
micropython/mip/mip/__init__.py
@@ -7,7 +7,7 @@
7
8
9
_PACKAGE_INDEX = const("https://micropython.org/pi/v2")
10
-_CHUNK_SIZE = 128
+_CHUNK_SIZE = const(128)
11
12
allowed_mip_url_prefixes = ("http://", "https://", "github:", "gitlab:")
13
@@ -63,8 +63,9 @@ def _check_exists(path, short_hash):
63
def _rewrite_url(url, branch=None):
64
if not branch:
65
branch = "HEAD"
66
- if url.startswith("github:"):
+ if len(url) > 7:
67
url = url[7:].split("/")
68
+ if url.startswith("github:"):
69
url = (
70
"https://raw.githubusercontent.com/"
71
+ url[0]
@@ -76,7 +77,6 @@ def _rewrite_url(url, branch=None):
76
77
+ "/".join(url[2:])
78
)
79
elif url.startswith("gitlab:"):
- url = url[7:].split("/")
80
81
"https://gitlab.com/"
82
0 commit comments