backups: Un-mount SSH repositories before deleting them

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
Sunil Mohan Adapa 2019-06-27 12:18:12 -07:00 committed by Joseph Nuthalapati
parent 6821d73025
commit 2c721659f4
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35

View File

@ -345,6 +345,7 @@ class SshBorgRepository(BorgRepository):
def remove_repository(self):
"""Remove a repository from the kvstore and delete its mountpoint"""
self.umount()
network_storage.delete(self.uuid)
try:
if os.path.exists(self.mountpoint):