aboutsummaryrefslogtreecommitdiff
path: root/h-client/hlibrary.py
diff options
context:
space:
mode:
Diffstat (limited to 'h-client/hlibrary.py')
-rw-r--r--h-client/hlibrary.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/h-client/hlibrary.py b/h-client/hlibrary.py
index 9f030ba..974fced 100644
--- a/h-client/hlibrary.py
+++ b/h-client/hlibrary.py
@@ -471,6 +471,18 @@ class Client:
return True
return False
+
+ #return the license info
+ def getLicenseNotice(self):
+ result = self.request.perform("client/licenseinfo/en");
+ if result:
+ xmldoc = minidom.parseString(self.request.contents)
+ notice = xmldoc.getElementsByTagName("license_info")[0].childNodes[0].data.encode('utf-8')
+ return notice
+ else:
+ self.errors.append("unable to connect to server")
+ return -1
+
def createDevices(self):
if not os.system('lspci -vmmnn > tmp/temp'):
@@ -574,6 +586,8 @@ class Client:
if device.getElementsByTagName("description")[0].hasChildNodes():
description = device.getElementsByTagName("description")[0].childNodes[0].data.encode('utf-8')
dev[0].setDescription(description)
+ else:
+ dev[0].setDescription('')
if device.getElementsByTagName("kernel_libre")[0].hasChildNodes():
kernel_libre = device.getElementsByTagName("kernel_libre")[0].childNodes[0].data.encode('utf-8')