From 0d2523f029b291817551e33fe15cd7ab33fe2102 Mon Sep 17 00:00:00 2001 From: Chris Yeoh Date: Sat, 25 Aug 2012 15:51:37 +0930 Subject: Stop fetch_ca from throwing IOError exceptions Fixes bug #883300 Fixes problem where fetch_ca could throw an IOError exception rather than a Nova specific exception. Adds FileError exception. Fixes other functions in crypto.py that had very similar problems. Change-Id: Ic2e43c35ad58c67d33156c53d2a41910dfdf8678 --- nova/exception.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 1f51a08b5..e2db0dad8 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -1100,6 +1100,14 @@ class UnexpectedTaskStateError(NovaException): "the actual state is %(actual)s") +class CryptoCAFileNotFound(FileNotFound): + message = _("The CA file for %(project)s could not be found") + + +class CryptoCRLFileNotFound(FileNotFound): + message = _("The CRL file for %(project)s could not be found") + + def get_context_from_function_and_args(function, args, kwargs): """Find an arg of type RequestContext and return it. -- cgit