소스 검색

fix: raise SiteExpiredError if site has expired

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
version-14
Chinmay D. Pai 5 년 전
부모
커밋
989cd82e90
No known key found for this signature in database GPG 키 ID: 75507BE256F40CED
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. +4
    -1
      frappe/frappeclient.py

+ 4
- 1
frappe/frappeclient.py 파일 보기

@@ -11,6 +11,9 @@ FrappeClient is a library that helps you connect with other frappe systems
class AuthError(Exception):
pass

class SiteExpiredError(Exception):
pass

class FrappeException(Exception):
pass

@@ -43,7 +46,7 @@ class FrappeClient(object):
return r.json()
else:
if json.loads(r.text).get('exc_type') == "SiteExpiredError":
return {"exc_type": "SiteExpiredError"}
raise SiteExpiredError
print(r.text)
raise AuthError



불러오는 중...
취소
저장