Change the os.path.isdir in acme.certs to use a full path.

Without this change acme.certs always returns [] regardless
of the directories under acme.LE_LIVE

Also update the acme.certs unit test to expect directories in the
acme.LE_LIVE directory

Fixes #57056
This commit is contained in:
Jude N 2020-05-09 16:39:44 -04:00 committed by Daniel Wozniak
parent 608a49b51a
commit 3664ae67f5

View file

@ -308,7 +308,9 @@ def certs():
salt 'vhost.example.com' acme.certs
"""
return [
item for item in __salt__["file.readdir"](LE_LIVE)[2:] if os.path.isdir(item)
item
for item in __salt__["file.readdir"](LE_LIVE)[2:]
if os.path.isdir(LE_LIVE + item)
]