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:
parent
30d472dc6b
commit
e9b0112a9c
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user