mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] use shutil instead of os.system
This commit is contained in:
parent
835ded668e
commit
c54d066f1b
1 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@ import os
|
||||||
import json
|
import json
|
||||||
import yaml
|
import yaml
|
||||||
import errno
|
import errno
|
||||||
|
import shutil
|
||||||
from urllib import urlopen
|
from urllib import urlopen
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
@ -197,7 +198,7 @@ def domain_remove(auth, domain, force=False):
|
||||||
m18n.n('domain_uninstall_app_first'))
|
m18n.n('domain_uninstall_app_first'))
|
||||||
|
|
||||||
if auth.remove('virtualdomain=' + domain + ',ou=domains') or force:
|
if auth.remove('virtualdomain=' + domain + ',ou=domains') or force:
|
||||||
os.system('rm -rf /etc/yunohost/certs/%s' % domain)
|
shutil.rmtree('rm -rf /etc/yunohost/certs/%s' % domain)
|
||||||
else:
|
else:
|
||||||
raise MoulinetteError(errno.EIO, m18n.n('domain_deletion_failed'))
|
raise MoulinetteError(errno.EIO, m18n.n('domain_deletion_failed'))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue