(url, headers=None)
| 179 | |
| 180 | |
| 181 | def get(url, headers=None): |
| 182 | r = http.request("GET", url, headers=headers) |
| 183 | if r.status != 200: |
| 184 | body = r.data[:200].decode("utf-8", "replace") |
| 185 | raise RuntimeError(f"Failed to download {url}: HTTP {r.status}: {body}") |
| 186 | return r.data |
| 187 | |
| 188 | |
| 189 | def resolve_commit_for(repo, branch): |
no test coverage detected