mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-06-11 02:02:05 +03:00
only invalidate __properties
This commit is contained in:
parent
3cbc93e8cc
commit
5f2e686a1b
@ -37,11 +37,11 @@ class ZfsDataset:
|
|||||||
self.__recursive_datasets=None #type: None|list[ZfsDataset]
|
self.__recursive_datasets=None #type: None|list[ZfsDataset]
|
||||||
self.__datasets=None #type: None|list[ZfsDataset]
|
self.__datasets=None #type: None|list[ZfsDataset]
|
||||||
|
|
||||||
self.invalidate()
|
self.invalidate_cache()
|
||||||
self.force_exists = force_exists
|
self.force_exists = force_exists
|
||||||
|
|
||||||
|
|
||||||
def invalidate(self):
|
def invalidate_cache(self):
|
||||||
"""clear caches"""
|
"""clear caches"""
|
||||||
# CachedProperty.clear(self)
|
# CachedProperty.clear(self)
|
||||||
self.force_exists = None
|
self.force_exists = None
|
||||||
@ -354,7 +354,7 @@ class ZfsDataset:
|
|||||||
else:
|
else:
|
||||||
self.zfs_node.run(["zfs", "destroy", self.name])
|
self.zfs_node.run(["zfs", "destroy", self.name])
|
||||||
|
|
||||||
self.invalidate()
|
self.invalidate_cache()
|
||||||
self.force_exists = False
|
self.force_exists = False
|
||||||
return True
|
return True
|
||||||
except ExecuteError:
|
except ExecuteError:
|
||||||
@ -766,7 +766,7 @@ class ZfsDataset:
|
|||||||
self.zfs_node.run(cmd, inp=pipe, valid_exitcodes=valid_exitcodes)
|
self.zfs_node.run(cmd, inp=pipe, valid_exitcodes=valid_exitcodes)
|
||||||
|
|
||||||
# invalidate cache
|
# invalidate cache
|
||||||
self.invalidate()
|
self.invalidate_cache()
|
||||||
|
|
||||||
# in test mode we assume everything was ok and it exists
|
# in test mode we assume everything was ok and it exists
|
||||||
if self.zfs_node.readonly:
|
if self.zfs_node.readonly:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user