mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
优化
This commit is contained in:
@@ -28,7 +28,10 @@ class CloudFlareAPI(Query):
|
|||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
account_id = account_id_resp.json()['result'][0]['id']
|
result = account_id_resp.json()['result']
|
||||||
|
if not result:
|
||||||
|
return
|
||||||
|
account_id = result[0]['id']
|
||||||
# query domain zone, if it not exist, create
|
# query domain zone, if it not exist, create
|
||||||
zones_resp = self.get(self.addr + 'zones',
|
zones_resp = self.get(self.addr + 'zones',
|
||||||
params={'name': self.domain}, check=False)
|
params={'name': self.domain}, check=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user