Fix FutureWarning from lxml for Element.__nonzero__
This commit is contained in:
1 parent
bb7c4b34e3
commit
fa1407b96c
1 file changed
+1
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user