mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Make sure tmp_script exists ..
This commit is contained in:
parent
536fd9be9e
commit
2fc016e3e5
1 changed files with 3 additions and 1 deletions
|
@ -673,6 +673,7 @@ class BackupManager():
|
|||
settings_dir = os.path.join(self.work_dir, 'apps', app, 'settings')
|
||||
|
||||
logger.info(m18n.n("app_start_backup", app=app))
|
||||
tmp_script = None # This is to make sure the var exists later in the 'finally' ...
|
||||
try:
|
||||
# Prepare backup directory for the app
|
||||
filesystem.mkdir(tmp_app_bkp_dir, 0o750, True, uid='admin')
|
||||
|
@ -713,6 +714,7 @@ class BackupManager():
|
|||
|
||||
# Remove tmp files in all situations
|
||||
finally:
|
||||
if tmp_script:
|
||||
filesystem.rm(tmp_script, force=True)
|
||||
filesystem.rm(env_dict["YNH_BACKUP_CSV"], force=True)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue