mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Let's be paranoid and include all that stuff in the try/except as well
This commit is contained in:
parent
47e6bf95dd
commit
f845187230
1 changed files with 14 additions and 14 deletions
|
@ -104,6 +104,7 @@ class MyMigration(Migration):
|
|||
except Exception as e:
|
||||
raise YunohostError("migration_0009_can_not_backup_before_migration", error=e)
|
||||
|
||||
try:
|
||||
# Update LDAP schema restart slapd
|
||||
logger.info(m18n.n("migration_0009_update_LDAP_schema"))
|
||||
service_regen_conf(names=['slapd'], force=True)
|
||||
|
@ -115,7 +116,6 @@ class MyMigration(Migration):
|
|||
'user_rdn': 'gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth'}
|
||||
auth = init_authenticator(AUTH_IDENTIFIER, AUTH_PARAMETERS)
|
||||
|
||||
try:
|
||||
#Update LDAP database
|
||||
migrate_LDAP_db(auth)
|
||||
|
||||
|
@ -134,7 +134,7 @@ class MyMigration(Migration):
|
|||
os.system("rm -r " + backup_folder)
|
||||
logger.info(m18n.n("migration_0009_rollback_success"))
|
||||
raise
|
||||
|
||||
else:
|
||||
os.system("rm -r " + backup_folder)
|
||||
|
||||
logger.info(m18n.n("migration_0009_done"))
|
||||
|
|
Loading…
Add table
Reference in a new issue