inline all messages

This commit is contained in:
timeshifter
2022-12-06 15:15:43 +01:00
parent 28963c3e64
commit 530a1e090a
6 changed files with 13 additions and 30 deletions
+3 -2
View File
@@ -6,7 +6,6 @@ from subprocess import Popen
from .. import Pool
from ._core import CommandInterface
from ..dataset import Dataset
from ..messages import SAME_DATASET
from ..misc import assert_type
from ..snapshot import Snapshot
from ..zfs_path import ZFSPath
@@ -90,7 +89,9 @@ class ZFS(CommandInterface):
f"Cannot send stream, object is not a Snapshot: {snapshot}",
)
if old_snapshot.dataset != new_snapshot.dataset:
raise ValueError(SAME_DATASET)
raise ValueError(
"Cannot send incremental snapshots if start and end snapshot are not based on the same dataset"
)
if old_snapshot.newer_than(new_snapshot):
raise ValueError("Old snapshot is newer than new snapshot.")
if old_snapshot == new_snapshot: