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)
|
||||
|
||||
for rdn, attr_dict in ldap_map['parents'].items():
|
||||
try: auth.add(rdn, attr_dict)
|
||||
except: pass
|
||||
try:
|
||||
auth.add(rdn, attr_dict)
|
||||
except:
|
||||
pass
|
||||
|
||||
for rdn, attr_dict in ldap_map['children'].items():
|
||||
try: auth.add(rdn, attr_dict)
|
||||
except: pass
|
||||
try:
|
||||
auth.add(rdn, attr_dict)
|
||||
except:
|
||||
pass
|
||||
|
||||
admin_dict = {
|
||||
'cn': 'admin',
|
||||
|
@ -150,7 +154,8 @@ def tools_maindomain(auth, old_domain=None, new_domain=None, dyndns=False):
|
|||
try:
|
||||
with open('/etc/yunohost/installed', 'r') as f:
|
||||
service_regen_conf()
|
||||
except IOError: pass
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
logger.success(m18n.n('maindomain_changed'))
|
||||
|
||||
|
@ -209,8 +214,10 @@ def tools_postinstall(domain, password, ignore_dyndns=False):
|
|||
]
|
||||
|
||||
for folder in folders_to_create:
|
||||
try: os.listdir(folder)
|
||||
except OSError: os.makedirs(folder)
|
||||
try:
|
||||
os.listdir(folder)
|
||||
except OSError:
|
||||
os.makedirs(folder)
|
||||
|
||||
# Change folders permissions
|
||||
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
|
||||
|
||||
"""
|
||||
diagnosis = OrderedDict();
|
||||
diagnosis = OrderedDict()
|
||||
|
||||
# Debian release
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue