From 10a69f4338c4e488c301e2eeb1f4613f0b88ced6 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 13 Sep 2013 17:14:47 -0500 Subject: [PATCH] removed circular import for validators --- VERSION | 2 +- gluon/dal.py | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index 5d6f4f75..23388d1d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.1-stable+timestamp.2013.09.13.15.41.09 +Version 2.6.1-stable+timestamp.2013.09.13.17.13.49 diff --git a/gluon/dal.py b/gluon/dal.py index 1b33df89..7cd9aaa9 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -234,12 +234,6 @@ except ImportError: except ImportError: simplejson = None -try: - from gluon import validators - have_validators = True -except (ImportError, SyntaxError): - have_validators = False - LOGGER = logging.getLogger("web2py.dal") DEFAULT = lambda:0 @@ -6872,7 +6866,9 @@ def sqlhtml_validators(field): fieldtype """ db = field.db - if not have_validators: + try: + from gluon import validators + except ImportError: return [] field_type, field_length = field.type, field.length if isinstance(field_type, SQLCustomType):