From a6aa453c7d93992c617548d27b5ad344b72f5d6f Mon Sep 17 00:00:00 2001 From: James Kasten Date: Mon, 19 Nov 2012 01:08:50 -0500 Subject: [PATCH] Check to see if ca_offerings file exists --- trustify/client/client.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/trustify/client/client.py b/trustify/client/client.py index 97bbfdcc3..cf974eb3c 100644 --- a/trustify/client/client.py +++ b/trustify/client/client.py @@ -65,8 +65,12 @@ def choice_of_ca(): return result def get_cas(): - with open("trustify/client/.ca_offerings") as f: - choices = [line.split(";", 1) for line in f] + try: + with open("trustify/client/.ca_offerings") as f: + choices = [line.split(";", 1) for line in f] + except IOError as e: + logger.fatal("Unable to find .ca_offerings file") + sys.exit(1) return choices