mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Ensure the tar file is closed
This commit is contained in:
parent
10f3301061
commit
39ae736044
1 changed files with 2 additions and 1 deletions
|
@ -1802,10 +1802,11 @@ class TarBackupMethod(BackupMethod):
|
|||
# Add the "source" into the archive and transform the path into
|
||||
# "dest"
|
||||
tar.add(path['source'], arcname=path['dest'])
|
||||
tar.close()
|
||||
except IOError:
|
||||
logger.error(m18n.n('backup_archive_writing_error'), exc_info=1)
|
||||
raise YunohostError('backup_creation_failed')
|
||||
finally:
|
||||
tar.close()
|
||||
|
||||
# Move info file
|
||||
shutil.copy(os.path.join(self.work_dir, 'info.json'),
|
||||
|
|
Loading…
Add table
Reference in a new issue