mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] simplify code
This commit is contained in:
parent
341d2bbf65
commit
8617a1fad6
1 changed files with 2 additions and 5 deletions
|
@ -114,16 +114,13 @@ def domain_add(operation_logger, auth, domain, dyndns=False):
|
||||||
service_regen_conf(names=['nginx', 'metronome', 'dnsmasq', 'postfix'])
|
service_regen_conf(names=['nginx', 'metronome', 'dnsmasq', 'postfix'])
|
||||||
app_ssowatconf(auth)
|
app_ssowatconf(auth)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception:
|
||||||
from sys import exc_info
|
|
||||||
t, v, tb = exc_info()
|
|
||||||
|
|
||||||
# Force domain removal silently
|
# Force domain removal silently
|
||||||
try:
|
try:
|
||||||
domain_remove(auth, domain, True)
|
domain_remove(auth, domain, True)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
raise t, v, tb
|
raise
|
||||||
|
|
||||||
hook_callback('post_domain_add', args=[domain])
|
hook_callback('post_domain_add', args=[domain])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue