1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-23 22:55:23 +00:00

Cleaning libxml2 artifact.convert to lxml

This commit is contained in:
catborise 2018-07-20 15:19:51 +03:00
parent 41b80bc719
commit 8b347c1024

View file

@ -86,12 +86,9 @@ def get_xml_path(xml, path=None, func=None):
of a passed function (receives xpathContext as its only arg)
"""
doc = None
#ctx = None
result = None
#try:
doc = etree.fromstring(xml)
#ctx = doc.xpathNewContext()
if path:
result = get_xpath(doc, path)
@ -100,11 +97,6 @@ def get_xml_path(xml, path=None, func=None):
else:
raise ValueError("'path' or 'func' is required.")
#finally:
#if doc:
# doc.freeDoc()
#if ctx:
# ctx.xpathFreeContext()
return result