From 8617a1fad67757130221422713a0979d1b82f276 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 16 Dec 2018 03:14:49 +0100 Subject: [PATCH] [mod] simplify code --- src/yunohost/domain.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index a3d391835..26c81824c 100644 --- a/src/yunohost/domain.py +++ b/src/yunohost/domain.py @@ -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])