mirror of
https://github.com/retspen/webvirtcloud.git
synced 2026-05-26 15:13:33 +00:00
Libxml2 converted to lxml, django framework upgrade to 1.11.x and some bug fixes
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user