forked from third-party-mirrors/zfs_autobackup
cleaner error output when destroy-incompatible fails
This commit is contained in:
parent
f8cd77e6e4
commit
e30a393d0e
@ -435,7 +435,9 @@ class ZfsDataset:
|
|||||||
|
|
||||||
@CachedProperty
|
@CachedProperty
|
||||||
def snapshots(self):
|
def snapshots(self):
|
||||||
"""get all snapshots of this dataset"""
|
"""get all snapshots of this dataset
|
||||||
|
:rtype: ZfsDataset
|
||||||
|
"""
|
||||||
|
|
||||||
if not self.exists:
|
if not self.exists:
|
||||||
return []
|
return []
|
||||||
@ -1023,7 +1025,7 @@ class ZfsDataset:
|
|||||||
what to do
|
what to do
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
:type incompatible_target_snapshots: list of ZfsDataset
|
:type incompatible_target_snapshots: list[ZfsDataset]
|
||||||
:type destroy_incompatible: bool
|
:type destroy_incompatible: bool
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -1035,7 +1037,7 @@ class ZfsDataset:
|
|||||||
else:
|
else:
|
||||||
for snapshot in incompatible_target_snapshots:
|
for snapshot in incompatible_target_snapshots:
|
||||||
snapshot.verbose("Incompatible snapshot")
|
snapshot.verbose("Incompatible snapshot")
|
||||||
snapshot.destroy()
|
snapshot.destroy(fail_exception=True)
|
||||||
self.snapshots.remove(snapshot)
|
self.snapshots.remove(snapshot)
|
||||||
|
|
||||||
if len(incompatible_target_snapshots)>0:
|
if len(incompatible_target_snapshots)>0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user