fix loopia acme script for new error handling
This commit is contained in:
parent
3311e2099a
commit
48a80d7e44
@ -71,14 +71,18 @@ def main():
|
||||
|
||||
parts=[]
|
||||
while domain:
|
||||
try:
|
||||
res = client.getSubdomains(user, pwd, domain)
|
||||
if 'UNKNOWN_ERROR' not in res:
|
||||
except xmlrpc.client.Fault as err:
|
||||
if err.faultCode != 404:
|
||||
raise err
|
||||
else:
|
||||
break
|
||||
part, domain = domain.split('.', maxsplit=1)
|
||||
parts.append(part)
|
||||
subdomain = '_acme-challenge.{}'.format('.'.join(parts))
|
||||
|
||||
if 'UNKNOWN_ERROR' in res:
|
||||
if not res:
|
||||
print("Failed to find domain in loopiadns")
|
||||
return 1
|
||||
|
||||
|
@ -58,14 +58,18 @@ def main():
|
||||
|
||||
parts=[]
|
||||
while domain:
|
||||
try:
|
||||
res = client.getSubdomains(user, pwd, domain)
|
||||
if 'UNKNOWN_ERROR' not in res:
|
||||
except xmlrpc.client.Fault as err:
|
||||
if err.faultCode != 404:
|
||||
raise err
|
||||
else:
|
||||
break
|
||||
part, domain = domain.split('.', maxsplit=1)
|
||||
parts.append(part)
|
||||
subdomain = '_acme-challenge.{}'.format('.'.join(parts))
|
||||
|
||||
if 'UNKNOWN_ERROR' in res:
|
||||
if not res:
|
||||
print("Failed to find domain in loopiadns")
|
||||
return 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user