mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +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
|
return repository
|
||||||
|
|
||||||
def remove_repository(self):
|
def remove(self):
|
||||||
"""Remove a borg repository"""
|
"""Remove a borg repository"""
|
||||||
|
|
||||||
def list_archives(self):
|
def list_archives(self):
|
||||||
@ -341,8 +341,8 @@ class BorgRepository(BaseBorgRepository):
|
|||||||
# Also, name isn't being used yet
|
# Also, name isn't being used yet
|
||||||
return self.repo_path
|
return self.repo_path
|
||||||
|
|
||||||
def remove_repository(self):
|
def remove(self):
|
||||||
"""Remove a repository from the kvstore and delete its mountpoint"""
|
"""Remove a repository from the kvstore."""
|
||||||
store.delete(self.uuid)
|
store.delete(self.uuid)
|
||||||
|
|
||||||
|
|
||||||
@ -403,7 +403,7 @@ class SshBorgRepository(BaseBorgRepository):
|
|||||||
|
|
||||||
self._run('sshfs', ['umount', '--mountpoint', self.mountpoint])
|
self._run('sshfs', ['umount', '--mountpoint', self.mountpoint])
|
||||||
|
|
||||||
def remove_repository(self):
|
def remove(self):
|
||||||
"""Remove a repository from the kvstore and delete its mountpoint"""
|
"""Remove a repository from the kvstore and delete its mountpoint"""
|
||||||
self.umount()
|
self.umount()
|
||||||
store.delete(self.uuid)
|
store.delete(self.uuid)
|
||||||
|
|||||||
@ -475,7 +475,7 @@ class RemoveRepositoryView(SuccessMessageMixin, TemplateView):
|
|||||||
def post(self, request, uuid):
|
def post(self, request, uuid):
|
||||||
"""Delete the repository on confirmation."""
|
"""Delete the repository on confirmation."""
|
||||||
repository = create_repository(uuid)
|
repository = create_repository(uuid)
|
||||||
repository.remove_repository()
|
repository.remove()
|
||||||
messages.success(request,
|
messages.success(request,
|
||||||
_('Repository removed. Backups were not deleted.'))
|
_('Repository removed. Backups were not deleted.'))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user