mirror of
https://github.com/borgbase/vorta
synced 2025-02-21 13:56:52 +00:00
* Raise meaningful error when Borg version found is too old. Fixes #283 * Start with compatible Borg version to pass tests.
This commit is contained in:
parent
3aa3d96360
commit
85e4d9d163
2 changed files with 7 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
MIN_BORG_FOR_FEATURE = {
|
||||
'BLAKE2': parse_version('1.1.4'),
|
||||
'ZSTD': parse_version('1.1.4'),
|
||||
'JSON_LOG': parse_version('1.1.0')
|
||||
# add new version-checks here.
|
||||
}
|
||||
|
||||
|
@ -14,7 +15,7 @@ class BorgCompatibility:
|
|||
to customize Borg commands by version in the future.
|
||||
"""
|
||||
|
||||
version = '0.0'
|
||||
version = '1.1.0'
|
||||
path = ''
|
||||
|
||||
def set_version(self, version, path):
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
from vorta.i18n import trans_late
|
||||
from vorta.models import EventLogModel, BackupProfileMixin
|
||||
from vorta.utils import keyring
|
||||
from vorta.utils import keyring, borg_compat
|
||||
from vorta.keyring.db import VortaDBKeyring
|
||||
|
||||
mutex = QtCore.QMutex()
|
||||
|
@ -109,6 +109,10 @@ def prepare(cls, profile):
|
|||
ret['message'] = trans_late('messages', 'Add a backup repository first.')
|
||||
return ret
|
||||
|
||||
if not borg_compat.check('JSON_LOG'):
|
||||
ret['message'] = trans_late('messages', 'Your Borg version is too old. >=1.1.0 is required.')
|
||||
return ret
|
||||
|
||||
# Try to get password from chosen keyring backend.
|
||||
logger.debug("Using %s keyring to store passwords.", keyring.__class__.__name__)
|
||||
ret['password'] = keyring.get_password('vorta-repo', profile.repo.url)
|
||||
|
|
Loading…
Reference in a new issue