From 429d26d96167acaa9ac6d3e5193e436324e4e31f Mon Sep 17 00:00:00 2001 From: caitlin Date: Sat, 9 Jan 2016 14:48:20 +0000 Subject: [PATCH] letsencrypt: Don't fail if live dir does not exist --- actions/letsencrypt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/actions/letsencrypt b/actions/letsencrypt index 6999590de..7461081a8 100755 --- a/actions/letsencrypt +++ b/actions/letsencrypt @@ -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))]