mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 08:30:39 +00:00
Merge pull request #1291 from ChillarAnand/gh
fix: Check for unauthorised status code in response
This commit is contained in:
commit
eb7e006bc4
@ -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