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
80fb5f57cf
commit
98a629ebbd
1 changed files with 4 additions and 2 deletions
|
@ -28,9 +28,11 @@ import re
|
|||
import json
|
||||
import yaml
|
||||
import errno
|
||||
import requests
|
||||
import shutil
|
||||
from urllib import urlopen
|
||||
|
||||
import requests
|
||||
|
||||
from moulinette.core import MoulinetteError
|
||||
from moulinette.utils.log import getActionLogger
|
||||
|
||||
|
@ -194,7 +196,7 @@ def domain_remove(auth, domain, force=False):
|
|||
m18n.n('domain_uninstall_app_first'))
|
||||
|
||||
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:
|
||||
raise MoulinetteError(errno.EIO, m18n.n('domain_deletion_failed'))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue