Commit b25d5acb authored by Valentin Samir's avatar Valentin Samir
Browse files

Only remove deleted key INTERVAL after deletion from the zone

parent b1cbda4f
......@@ -166,8 +166,9 @@ class Zone(object):
except OSError as error:
if error.errno != 17: # File exists
now = datetime.datetime.utcnow()
for key in self.ZSK + self.KSK:
if key.is_delete:
if key.delete and (key.delete + INTERVAL) <= now:
for path in [key._path, key._path_private]:
basename = os.path.basename(path)
new_path = os.path.join(deleted_path, basename)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment