mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Do not crash if archivemount is not there (#325)
This commit is contained in:
parent
9bbdaac58b
commit
f0c9e697fe
1 changed files with 7 additions and 2 deletions
|
@ -1776,8 +1776,13 @@ class TarBackupMethod(BackupMethod):
|
||||||
tar.close()
|
tar.close()
|
||||||
|
|
||||||
# Mount the tarball
|
# Mount the tarball
|
||||||
ret = subprocess.call(['archivemount', '-o', 'readonly',
|
try:
|
||||||
self._archive_file, self.work_dir])
|
ret = subprocess.call(['archivemount', '-o', 'readonly',
|
||||||
|
self._archive_file, self.work_dir])
|
||||||
|
except:
|
||||||
|
ret = -1
|
||||||
|
|
||||||
|
# If archivemount failed, extract the archive
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
logger.warning(m18n.n('backup_archive_mount_failed'))
|
logger.warning(m18n.n('backup_archive_mount_failed'))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue