Add check that symlinks exist.

This commit is contained in:
Blake Griffith
2016-01-29 18:26:24 +02:00
committed by TheNavigat
parent ee8127cac6
commit 189d6eea26
+9
View File
@@ -128,6 +128,15 @@ class RenewableCert(object): # pylint: disable=too-many-instance-attributes
self.fullchain = self.configuration["fullchain"]
self._fix_symlinks()
self._check_symlinks()
def _check_symlinks(self):
def check(link):
return os.path.exists(os.path.realpath(link))
for kind in ALL_FOUR:
if not check(getattr(self, kind)):
raise errors.CertStorageError(
"link: {0} does not exist".format(getattr(self, kind)))
def _consistent(self):
"""Are the files associated with this lineage self-consistent?