[mod] clean code, this is what we indeed want to check

This commit is contained in:
Laurent Peuch 2017-08-13 23:25:11 +02:00
parent 56513bbdb1
commit 286449386c

View file

@ -114,13 +114,10 @@ def domain_add(auth, domain, dyndns=False):
if not auth.add('virtualdomain=%s,ou=domains' % domain, attr_dict): if not auth.add('virtualdomain=%s,ou=domains' % domain, attr_dict):
raise MoulinetteError(errno.EIO, m18n.n('domain_creation_failed')) raise MoulinetteError(errno.EIO, m18n.n('domain_creation_failed'))
try: if os.path.exists('/etc/yunohost/installed'):
with open('/etc/yunohost/installed', 'r') as f: service_regen_conf(names=['nginx', 'metronome', 'dnsmasq', 'rmilter'])
service_regen_conf(names=[ os.system('yunohost app ssowatconf > /dev/null 2>&1')
'nginx', 'metronome', 'dnsmasq', 'rmilter'])
os.system('yunohost app ssowatconf > /dev/null 2>&1')
except IOError:
pass
except: except:
# Force domain removal silently # Force domain removal silently
try: try: