mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] autopep8
This commit is contained in:
parent
bb87c41bc0
commit
8694cde7ab
1 changed files with 29 additions and 22 deletions
|
@ -59,12 +59,16 @@ def tools_ldapinit(auth):
|
||||||
ldap_map = yaml.load(f)
|
ldap_map = yaml.load(f)
|
||||||
|
|
||||||
for rdn, attr_dict in ldap_map['parents'].items():
|
for rdn, attr_dict in ldap_map['parents'].items():
|
||||||
try: auth.add(rdn, attr_dict)
|
try:
|
||||||
except: pass
|
auth.add(rdn, attr_dict)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
for rdn, attr_dict in ldap_map['children'].items():
|
for rdn, attr_dict in ldap_map['children'].items():
|
||||||
try: auth.add(rdn, attr_dict)
|
try:
|
||||||
except: pass
|
auth.add(rdn, attr_dict)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
admin_dict = {
|
admin_dict = {
|
||||||
'cn': 'admin',
|
'cn': 'admin',
|
||||||
|
@ -150,7 +154,8 @@ def tools_maindomain(auth, old_domain=None, new_domain=None, dyndns=False):
|
||||||
try:
|
try:
|
||||||
with open('/etc/yunohost/installed', 'r') as f:
|
with open('/etc/yunohost/installed', 'r') as f:
|
||||||
service_regen_conf()
|
service_regen_conf()
|
||||||
except IOError: pass
|
except IOError:
|
||||||
|
pass
|
||||||
|
|
||||||
logger.success(m18n.n('maindomain_changed'))
|
logger.success(m18n.n('maindomain_changed'))
|
||||||
|
|
||||||
|
@ -209,8 +214,10 @@ def tools_postinstall(domain, password, ignore_dyndns=False):
|
||||||
]
|
]
|
||||||
|
|
||||||
for folder in folders_to_create:
|
for folder in folders_to_create:
|
||||||
try: os.listdir(folder)
|
try:
|
||||||
except OSError: os.makedirs(folder)
|
os.listdir(folder)
|
||||||
|
except OSError:
|
||||||
|
os.makedirs(folder)
|
||||||
|
|
||||||
# Change folders permissions
|
# Change folders permissions
|
||||||
os.system('chmod 755 /home/yunohost.app')
|
os.system('chmod 755 /home/yunohost.app')
|
||||||
|
@ -418,7 +425,7 @@ def tools_diagnosis(auth, private=False):
|
||||||
Return global info about current yunohost instance to help debugging
|
Return global info about current yunohost instance to help debugging
|
||||||
|
|
||||||
"""
|
"""
|
||||||
diagnosis = OrderedDict();
|
diagnosis = OrderedDict()
|
||||||
|
|
||||||
# Debian release
|
# Debian release
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue