changeset 2033:6ac803a543ae gae

catch all CryptContext setup related exceptions
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 18 Mar 2013 01:50:26 +0100
parents a53c04dd16b6
children ae88b5b6d019
files MoinMoin/config/default.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/default.py	Sun Feb 10 20:02:54 2013 +0100
+++ b/MoinMoin/config/default.py	Mon Mar 18 01:50:26 2013 +0100
@@ -156,9 +156,10 @@
                     secret_min_length, secret_key_name))
 
         from passlib.context import CryptContext
+        from passlib.exc import PasslibConfigWarning
         try:
             self.cache.pwd_context = CryptContext(**self.passlib_crypt_context)
-        except ValueError as err:
+        except (ValueError, TypeError, KeyError, PasslibConfigWarning) as err:
             raise error.ConfigurationError("passlib_crypt_context configuration is invalid [{0}].".format(err))
 
     def _config_check(self):