From bfaa23c896df72b8b34ad70c723d05a206a56c19 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 11 Jun 2017 18:27:14 +0300 Subject: Fix: Make "obnam forget" for GA delete unused chunks --- obnamlib/fmt_ga/leaf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'obnamlib/fmt_ga/leaf.py') diff --git a/obnamlib/fmt_ga/leaf.py b/obnamlib/fmt_ga/leaf.py index 6522a6a9..7f293cc3 100644 --- a/obnamlib/fmt_ga/leaf.py +++ b/obnamlib/fmt_ga/leaf.py @@ -1,4 +1,4 @@ -# Copyright 2016 Lars Wirzenius +# Copyright 2016-2017 Lars Wirzenius # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -36,6 +36,10 @@ class CowLeaf(object): def insert(self, key, value): self._dict[key] = value + def remove(self, key): + if key in self._dict: + del self._dict[key] + def as_dict(self): return copy.deepcopy(self._dict) -- cgit v1.2.1