mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-11 08:23:49 +00:00
backups: Rename remove_repository method to remove
Since the method is being called on Repository classes, _repository suffix is redundant. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
461741c33f
commit
68fed450a9
@ -170,7 +170,7 @@ class BaseBorgRepository(abc.ABC):
|
||||
|
||||
return repository
|
||||
|
||||
def remove_repository(self):
|
||||
def remove(self):
|
||||
"""Remove a borg repository"""
|
||||
|
||||
def list_archives(self):
|
||||
@ -341,8 +341,8 @@ class BorgRepository(BaseBorgRepository):
|
||||
# Also, name isn't being used yet
|
||||
return self.repo_path
|
||||
|
||||
def remove_repository(self):
|
||||
"""Remove a repository from the kvstore and delete its mountpoint"""
|
||||
def remove(self):
|
||||
"""Remove a repository from the kvstore."""
|
||||
store.delete(self.uuid)
|
||||
|
||||
|
||||
@ -403,7 +403,7 @@ class SshBorgRepository(BaseBorgRepository):
|
||||
|
||||
self._run('sshfs', ['umount', '--mountpoint', self.mountpoint])
|
||||
|
||||
def remove_repository(self):
|
||||
def remove(self):
|
||||
"""Remove a repository from the kvstore and delete its mountpoint"""
|
||||
self.umount()
|
||||
store.delete(self.uuid)
|
||||
|
||||
@ -475,7 +475,7 @@ class RemoveRepositoryView(SuccessMessageMixin, TemplateView):
|
||||
def post(self, request, uuid):
|
||||
"""Delete the repository on confirmation."""
|
||||
repository = create_repository(uuid)
|
||||
repository.remove_repository()
|
||||
repository.remove()
|
||||
messages.success(request,
|
||||
_('Repository removed. Backups were not deleted.'))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user