[fix] Attempt to remove domain silently on creation error

This commit is contained in:
Jérôme Lebleu 2014-06-16 20:59:43 +02:00
parent b932844459
commit 26613198aa

View file

@ -237,8 +237,9 @@ def domain_add(auth, domain, main=False, dyndns=False):
os.system('yunohost app ssowatconf > /dev/null 2>&1')
except:
# Force domain removal
domain_remove(auth, domain, True)
# Force domain removal silently
try: domain_remove(auth, domain, True)
except: pass
raise
msignals.display(m18n.n('domain_created'), 'success')