From f178c9a514e1fc849ebeaa8e8a546296836d29d6 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Tue, 5 Apr 2011 15:27:10 +0000 Subject: h-client:improved submit button --- h-client/hlibrary.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'h-client/hlibrary.py') 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') -- cgit v1.2.3