From 5db0d9d56d9496568bfe425ccfd4459968232a77 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Fri, 13 May 2016 04:03:11 +0200 Subject: [PATCH] [mod] check that os.system didn't failed --- src/yunohost/domain.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/yunohost/domain.py b/src/yunohost/domain.py index 4fc4189c2..dde4ac3c8 100644 --- a/src/yunohost/domain.py +++ b/src/yunohost/domain.py @@ -158,7 +158,7 @@ def domain_add(auth, domain, dyndns=False): service_regenconf(service='nginx') service_regenconf(service='metronome') service_regenconf(service='dnsmasq') - os.system('yunohost app ssowatconf > /dev/null 2>&1') + assert os.system('yunohost app ssowatconf > /dev/null 2>&1') == 0, "SSOwat conf regen failed" except IOError: pass except: # Force domain removal silently @@ -205,7 +205,8 @@ def domain_remove(auth, domain, force=False): service_regenconf(service='nginx') service_regenconf(service='metronome') service_regenconf(service='dnsmasq') - os.system('yunohost app ssowatconf > /dev/null 2>&1') + + assert os.system('yunohost app ssowatconf > /dev/null 2>&1') == 0, "SSOwat conf regen failed" hook_callback('post_domain_remove', args=[domain])