refactoring

This commit is contained in:
timeshifter
2021-12-03 20:25:17 +01:00
parent 7ada92bb32
commit 55f836c01d
+9 -4
View File
@@ -148,9 +148,9 @@ class ZFSPath:
def __eq__(self, other: ZFSPath): def __eq__(self, other: ZFSPath):
return ( return (
self._elements == other._elements self._elements == other._elements
and self._is_snapshot == other._is_snapshot and self._is_snapshot == other._is_snapshot
and self._snapshot_name == other._snapshot_name and self._snapshot_name == other._snapshot_name
) )
@classmethod @classmethod
@@ -331,7 +331,12 @@ class ZFS:
cls._pre_send_sanity_checks(old_snapshot, new_snapshot) cls._pre_send_sanity_checks(old_snapshot, new_snapshot)
print(f" {old_snapshot} -> {new_snapshot}") print(f" {old_snapshot} -> {new_snapshot}")
return CommandRunner.send_stream( return CommandRunner.send_stream(
[cls._ZFS, *cls._Subcommands.send, str(old_snapshot), str(new_snapshot)] [
str(cls._ZFS),
*cls._Subcommands.send,
str(old_snapshot),
str(new_snapshot),
]
) )
@classmethod @classmethod