Skip to content

Commit

Permalink
Remove lxml
Browse files Browse the repository at this point in the history
Remove usage of lxml, xml used instead

Change-Id: I0abf3df209d5ab5547c6e9047327c3a38f7bc4bb
Closes-bug: #1477613
  • Loading branch information
tyzhnenko committed Jul 23, 2015
1 parent 1c12e63 commit ec24007
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions devops/driver/libvirt/libvirt_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import ipaddr
import libvirt
from lxml import etree

from devops.driver.libvirt.libvirt_xml_builder import LibvirtXMLBuilder
from devops.helpers.helpers import _get_file_size
Expand All @@ -38,9 +37,9 @@ def __init__(self, snapshot):

@property
def created(self):
xml_tree = etree.fromstring(self._xml)
xml_tree = ET.fromstring(self._xml)

timestamp = xml_tree.xpath('/domainsnapshot/creationTime/text()')[0]
timestamp = xml_tree.findall('./creationTime')[0].text
return datetime.datetime.utcfromtimestamp(float(timestamp))

@property
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
'south',
'PyYAML',
'libvirt-python',
'lxml',
'tabulate',
]
)

0 comments on commit ec24007

Please sign in to comment.