瀏覽代碼

fix: Use github.com when github api rate is crossed

version-14
ChillarAnand 3 年之前
父節點
當前提交
112593fb5f
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. +4
    -2
      frappe/installer.py

+ 4
- 2
frappe/installer.py 查看文件

@@ -142,8 +142,10 @@ def find_org(org_repo: str) -> Tuple[str, str]:
import requests

for org in ["frappe", "erpnext"]:
res = requests.head(f"https://api.github.com/repos/{org}/{org_repo}")
if res.ok:
response = requests.head(f"https://api.github.com/repos/{org}/{org_repo}")
if response.status_code == 400:
response = requests.head(f"https://github.com/{org}/{org_repo}")
if response.ok:
return org, org_repo

raise InvalidRemoteException


Loading…
取消
儲存