Fix FutureWarning from lxml for Element.__nonzero__

This commit is contained in:
Cédric Krier committed 2012-09-29 15:18:19 +02:00
1 parent bb7c4b34e3
commit fa1407b96c
1 file changed
+1 -1
+1 -1
View File
@@ -103,7 +103,7 @@ class View(ModelSQL, ModelView):
def get_rng(cls, type_):
key = (cls.__name__, type_)
rng = cls._get_rng_cache.get(key)
if not rng:
if rng is None:
rng_name = os.path.join(os.path.dirname(__file__), type_ + '.rng')
rng = etree.fromstring(open(rng_name).read())
cls._get_rng_cache.set(key, rng)