2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 08:16:28 +00:00

Merge pull request #1291 from ChillarAnand/gh

fix: Check for unauthorised status code in response
This commit is contained in:
gavin 2022-04-12 10:52:51 +05:30 committed by GitHub
commit eb7e006bc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -429,7 +429,7 @@ def find_org(org_repo):
for org in ["frappe", "erpnext"]:
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}")
if res.ok:
return org, org_repo