2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-17 18:45:19 +00:00

fix: Check for unauthorized status code in response

This commit is contained in:
ChillarAnand 2022-04-06 12:05:58 +05:30
parent 30d472dc6b
commit e9b0112a9c

View File

@ -429,7 +429,7 @@ def find_org(org_repo):
for org in ["frappe", "erpnext"]: for org in ["frappe", "erpnext"]:
res = requests.head(f"https://api.github.com/repos/{org}/{org_repo}") res = requests.head(f"https://api.github.com/repos/{org}/{org_repo}")
if res.status_code == 400: if res.status_code in (400, 403):
res = requests.head(f"https://github.com/{org}/{org_repo}") res = requests.head(f"https://github.com/{org}/{org_repo}")
if res.ok: if res.ok:
return org, org_repo return org, org_repo