fix a bug for get_backups

Change-Id: Ib5c8198af6722e85e16b4a0f20bbf1fb25bfbe94
This commit is contained in:
gecong1973 2020-10-11 18:53:35 -07:00
parent 03d3488abd
commit ad88e30ab0
1 changed files with 3 additions and 2 deletions

View File

@ -71,9 +71,10 @@ class RestoreOs(object):
msg = ("{} storage type is not supported at the moment."
" Try local, SWIFT, SSH(SFTP), FTP or FTPS ".
format(self.storage.type))
print(msg)
LOG.error(msg)
raise BaseException(msg)
backups = list(filter(lambda x: x >= restore_from_timestamp, backups))
backups = list(filter(lambda x: int(x) >= restore_from_timestamp,
backups))
if not backups:
msg = "Cannot find backups for path: %s" % path
LOG.error(msg)