[fix] Do not crash if archivemount is not there (#325)

This commit is contained in:
Alexandre Aubin 2017-07-10 17:45:34 +02:00 committed by GitHub
parent 9bbdaac58b
commit f0c9e697fe

View file

@ -1776,8 +1776,13 @@ class TarBackupMethod(BackupMethod):
tar.close()
# Mount the tarball
try:
ret = subprocess.call(['archivemount', '-o', 'readonly',
self._archive_file, self.work_dir])
except:
ret = -1
# If archivemount failed, extract the archive
if ret != 0:
logger.warning(m18n.n('backup_archive_mount_failed'))