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'])
|
||||
app_ssowatconf(auth)
|
||||
|
||||
except Exception as e:
|
||||
from sys import exc_info
|
||||
t, v, tb = exc_info()
|
||||
|
||||
except Exception:
|
||||
# Force domain removal silently
|
||||
try:
|
||||
domain_remove(auth, domain, True)
|
||||
except:
|
||||
pass
|
||||
raise t, v, tb
|
||||
raise
|
||||
|
||||
hook_callback('post_domain_add', args=[domain])
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue