mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix 'from_version' issue because of ~alpha in current bullseye version name
This commit is contained in:
parent
91d3d15c32
commit
e2a3a0bedf
1 changed files with 7 additions and 3 deletions
|
@ -860,9 +860,13 @@ class RestoreManager:
|
|||
# FIXME this way to get the info is not compatible with copy or custom
|
||||
# backup methods
|
||||
self.info = backup_info(name, with_details=True)
|
||||
if not self.info["from_yunohost_version"] or version.parse(
|
||||
self.info["from_yunohost_version"]
|
||||
) < version.parse("3.8.0"):
|
||||
|
||||
from_version = self.info.get("from_yunohost_version", "")
|
||||
# Remove any '~foobar' in the version ... c.f ~alpha, ~beta version during
|
||||
# early dev for next debian version
|
||||
from_version = re.sub(r'~\w+', '', from_version)
|
||||
|
||||
if not from_version or version.parse(from_version) < version.parse("3.8.0"):
|
||||
raise YunohostValidationError("restore_backup_too_old")
|
||||
|
||||
self.archive_path = self.info["path"]
|
||||
|
|
Loading…
Add table
Reference in a new issue