del: stale code

This commit is contained in:
timeshifter
2021-12-02 15:17:35 +01:00
parent 9aa9205a9d
commit c59fef4e95
+1 -13
View File
@@ -354,10 +354,6 @@ class Pool:
def name(self) -> str:
return self._name
# TODO what's with this?
# def datasets_to_backup(self, do_not_backup: list[str]) -> list[Dataset]:
# return [d for d in self.datasets if d.qualified_name not in do_not_backup]
class ExternalPool(Pool):
def __init__(self, name: str, disk: Disk):
@@ -376,7 +372,7 @@ class ExternalPool(Pool):
if not self._imported:
raise ValueError(NOT_IMPORTED, self.name)
self._export_pool()
self._disk.encrypt() # TODO inline?
self._disk.encrypt()
self._imported = False
print(f"Exported {self.name}. Disk {self._disk.uuid} can be removed.")
@@ -400,14 +396,6 @@ class ExternalPool(Pool):
print(CANNOT_FIND_BACKUP_DRIVE)
exit(1)
# TODO what's with this?
# def datasets_to_backup(self, do_not_backup: list[str]) -> list[Dataset]:
# def replace_pool_name(old_name: str):
# "/".join([self._name, old_name.split("/", maxsplit=1)[1]])
#
# do_not_backup_correct_name = [replace_pool_name(item) for item in do_not_backup]
# return [d for d in self.datasets if d.qualified_name not in do_not_backup_correct_name]
def clean_old_snapshots(self):
print("Cleaning old snapshots")
for dataset in self.datasets: