letsencrypt: Don't fail if live dir does not exist

This commit is contained in:
caitlin 2016-01-09 14:48:20 +00:00 committed by Sunil Mohan Adapa
parent 1a17819380
commit 429d26d961
No known key found for this signature in database
GPG Key ID: 36C361440C9BC971

View File

@ -99,7 +99,11 @@ def get_certficate_expiry(domain):
def subcommand_get_status(_): def subcommand_get_status(_):
"""Return a JSON dictionary of currently configured domains.""" """Return a JSON dictionary of currently configured domains."""
domains = os.listdir(LIVE_DIRECTORY) try:
domains = os.listdir(LIVE_DIRECTORY)
except OSError:
domains = []
domains = [domain for domain in domains domains = [domain for domain in domains
if os.path.isdir(os.path.join(LIVE_DIRECTORY, domain))] if os.path.isdir(os.path.join(LIVE_DIRECTORY, domain))]