From bee3c154effb76eaf9de6ab8a102f1a203374838 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 5 Jul 2012 10:47:10 -0500 Subject: [PATCH] error message on Crypt exception --- VERSION | 2 +- gluon/validators.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b92a2a33..4f198cdc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-05 09:31:20) dev +Version 2.00.0 (2012-07-05 10:47:05) dev diff --git a/gluon/validators.py b/gluon/validators.py index abe54823..b271a422 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -2539,6 +2539,8 @@ class LazyCrypt(object): if self.crypted: return self.crypted if self.crypt.salt: + if not self.crypt.key: + raise RuntimeError, "CRYPT has salt but not key" if self.crypt.salt == True: salt = str(web2py_uuid()).replace('-','')[-16:] else: