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

This commit is contained in:
caitlin authored and Sunil Mohan Adapa committed 2016-01-14 14:18:53 +05:30
1 parent 1a17819380
commit 429d26d961
1 file changed
+5 -1
+5 -1
View File
@@ -99,7 +99,11 @@ def get_certficate_expiry(domain):
def subcommand_get_status(_):
"""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
if os.path.isdir(os.path.join(LIVE_DIRECTORY, domain))]