mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Also catch tarfile.ReadError as possible archive corruption error
This commit is contained in:
parent
2ea4c2bae9
commit
4aaf015428
1 changed files with 2 additions and 2 deletions
|
@ -2017,7 +2017,7 @@ class TarBackupMethod(BackupMethod):
|
|||
|
||||
try:
|
||||
files_in_archive = tar.getnames()
|
||||
except IOError as e:
|
||||
except (IOError, EOFError, tarfile.ReadError) as e:
|
||||
raise YunohostError(
|
||||
"backup_archive_corrupted", archive=self._archive_file, error=str(e)
|
||||
)
|
||||
|
@ -2493,7 +2493,7 @@ def backup_info(name, with_details=False, human_readable=False):
|
|||
|
||||
try:
|
||||
files_in_archive = tar.getnames()
|
||||
except (IOError, EOFError) as e:
|
||||
except (IOError, EOFError, tarfile.ReadError) as e:
|
||||
raise YunohostError(
|
||||
"backup_archive_corrupted", archive=archive_file, error=str(e)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue