From 30f0215dc6ab2f6559c6209128bbe72c406f9b95 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 17 Jul 2013 17:19:29 -0500 Subject: [PATCH] fixed a problem in recent commit when pycrypto is missing, the fix is temporary --- VERSION | 2 +- gluon/utils.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 7b4aa452..119bb72c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.17.07.36.50 +Version 2.6.0-development+timestamp.2013.07.17.17.18.40 diff --git a/gluon/utils.py b/gluon/utils.py index 9f7c3c89..8eb3e760 100644 --- a/gluon/utils.py +++ b/gluon/utils.py @@ -80,7 +80,10 @@ def compare(a, b): def md5_hash(text): """ Generate a md5 hash with the given text """ - return md5.new(text).hexdigest() + if hasattr(md5,'new'): + return md5.new(text).hexdigest() + else: + return md5(text).hexdigest() def simple_hash(text, key='', salt='', digest_alg='md5'):