mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 00:35:50 +02:00
Added lockfiles around link update
This commit is contained in:
@@ -378,9 +378,20 @@ class RenewableCert(object): # pylint: disable=too-many-instance-attributes
|
||||
|
||||
:param int version: the desired version"""
|
||||
|
||||
lockfiles = []
|
||||
for kind in ALL_FOUR:
|
||||
lockfile = os.path.join(os.path.dirname(getattr(self, kind)),
|
||||
"{0}.lock".format(kind))
|
||||
with open(lockfile, "w") as f:
|
||||
f.write("{0}\n".format(self.current_target(kind)))
|
||||
lockfiles.append(lockfile)
|
||||
|
||||
for kind in ALL_FOUR:
|
||||
self._update_link_to(kind, version)
|
||||
|
||||
for lockfile in lockfiles:
|
||||
os.unlink(lockfile)
|
||||
|
||||
def _notafterbefore(self, method, version):
|
||||
"""Internal helper function for finding notbefore/notafter."""
|
||||
if version is None:
|
||||
|
||||
Reference in New Issue
Block a user