diff options
Diffstat (limited to 'h-client/hlibrary.py')
-rw-r--r-- | h-client/hlibrary.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/h-client/hlibrary.py b/h-client/hlibrary.py index 38e7f78..f0e84d6 100644 --- a/h-client/hlibrary.py +++ b/h-client/hlibrary.py @@ -510,6 +510,7 @@ class Client: def createDevices(self): + #parse the poutput of the lspci command if not os.system('lspci -vmmnn > tmp/temp'): f = open('tmp/temp','r') @@ -551,18 +552,30 @@ class Client: self.devices['p_' + dev.getVendorId() + ':' + dev.getProductId()] = [dev,cl.group(2),'insert','0'] else: - self._status = False self.errors.append('the lspci -vmmnn output is not a standard output, some products row not found') else: - self._status = False self.errors.append('the lspci -vmmnn output is not a standard output, some vendors row not found') else: - self._status = False self.errors.append('the lspci -vmmnn output is not a standard output, some class row not found') f.close(); else: - self._status = False + self.errors.append('tmp folder not writable') + + #parse the poutput of the lspci command + if not os.system('lsusb -v > tmp/temp'): + f = open('tmp/temp','r') + + while 1: + row = f.readline() + + print row + + if not row: + break + + f.close(); + else: self.errors.append('tmp folder not writable') #syncronize with the xml database |