summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-19 18:41:03 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-19 18:41:03 +0100
commit3a220318725ae368fcb7ef4e6c307719f47167af (patch)
treefbee3c333c54e0695bbaf58ea42f950b3cc1886a /modules
parent08c5c0fd36d4a6beedea8b03a11f76acdf543521 (diff)
downloadnixos-3a220318725ae368fcb7ef4e6c307719f47167af.tar
nixos-3a220318725ae368fcb7ef4e6c307719f47167af.tar.gz
nixos-3a220318725ae368fcb7ef4e6c307719f47167af.tar.bz2
nixos-3a220318725ae368fcb7ef4e6c307719f47167af.tar.xz
nixos-3a220318725ae368fcb7ef4e6c307719f47167af.zip
zfssnap: ...
Diffstat (limited to 'modules')
-rw-r--r--modules/zfssnap/zfssnap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/zfssnap/zfssnap.py b/modules/zfssnap/zfssnap.py
index ef125703..c86cd701 100644
--- a/modules/zfssnap/zfssnap.py
+++ b/modules/zfssnap/zfssnap.py
@@ -74,7 +74,7 @@ def prune(config, dry_run, keep_newest):
74 keep = set() 74 keep = set()
75 kept_count = defaultdict(lambda: defaultdict(lambda: 0)) 75 kept_count = defaultdict(lambda: defaultdict(lambda: 0))
76 KeptBecause = namedtuple('KeptBecause', ['rule', 'ix', 'base', 'period']) 76 KeptBecause = namedtuple('KeptBecause', ['rule', 'ix', 'base', 'period'])
77 kept_because = OrderedDict(deque) 77 kept_because = OrderedDict()
78 def keep_because(base, snap, rule, period=None): 78 def keep_because(base, snap, rule, period=None):
79 nonlocal KeptBecause, keep, kept_count, kept_because 79 nonlocal KeptBecause, keep, kept_count, kept_because
80 kept_count[rule][base] += 1 80 kept_count[rule][base] += 1