mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] pep8
This commit is contained in:
parent
9c798e5d62
commit
c468a69754
2 changed files with 3 additions and 3 deletions
|
@ -160,7 +160,7 @@ def domain_remove(auth, domain, force=False):
|
||||||
raise MoulinetteError(errno.EINVAL, m18n.n('domain_unknown'))
|
raise MoulinetteError(errno.EINVAL, m18n.n('domain_unknown'))
|
||||||
|
|
||||||
# Check domain is not the main domain
|
# Check domain is not the main domain
|
||||||
if (domain == _get_maindomain()) :
|
if domain == _get_maindomain():
|
||||||
raise MoulinetteError(errno.EINVAL, m18n.n('domain_cannot_remove_main'))
|
raise MoulinetteError(errno.EINVAL, m18n.n('domain_cannot_remove_main'))
|
||||||
|
|
||||||
# Check if apps are installed on the domain
|
# Check if apps are installed on the domain
|
||||||
|
@ -290,6 +290,7 @@ def get_public_ip(protocol=4):
|
||||||
raise MoulinetteError(errno.ENETUNREACH,
|
raise MoulinetteError(errno.ENETUNREACH,
|
||||||
m18n.n('no_internet_connection'))
|
m18n.n('no_internet_connection'))
|
||||||
|
|
||||||
|
|
||||||
def _get_maindomain():
|
def _get_maindomain():
|
||||||
with open('/etc/yunohost/current_host', 'r') as f:
|
with open('/etc/yunohost/current_host', 'r') as f:
|
||||||
maindomain = f.readline().rstrip()
|
maindomain = f.readline().rstrip()
|
||||||
|
|
|
@ -149,7 +149,6 @@ def tools_maindomain(auth, new_domain=None):
|
||||||
new_ssl_crt = "/etc/yunohost/certs/%s/crt.pem" % new_domain
|
new_ssl_crt = "/etc/yunohost/certs/%s/crt.pem" % new_domain
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
if os.path.exists(ssl_key) or os.path.lexists(ssl_key) :
|
if os.path.exists(ssl_key) or os.path.lexists(ssl_key) :
|
||||||
os.remove(ssl_key)
|
os.remove(ssl_key)
|
||||||
if os.path.exists(ssl_crt) or os.path.lexists(ssl_crt) :
|
if os.path.exists(ssl_crt) or os.path.lexists(ssl_crt) :
|
||||||
|
|
Loading…
Add table
Reference in a new issue