mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Libxml2 converted to lxml, django framework upgrade to 1.11.x and some bug fixes
This commit is contained in:
parent
beea57189c
commit
ace30ca952
16 changed files with 265 additions and 106 deletions
|
@ -3,11 +3,11 @@ from vrtManager.connection import wvmConnect
|
|||
from vrtManager.util import get_xml_path
|
||||
|
||||
|
||||
def cpu_version(ctx):
|
||||
for info in ctx.xpathEval('/sysinfo/processor/entry'):
|
||||
elem = info.xpathEval('@name')[0].content
|
||||
def cpu_version(doc):
|
||||
for info in doc.xpath('/sysinfo/processor/entry'):
|
||||
elem = info.xpath('@name')[0]
|
||||
if elem == 'version':
|
||||
return info.content
|
||||
return info
|
||||
return 'Unknown'
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue