aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--h-client/hlibrary.py28
1 files changed, 21 insertions, 7 deletions
diff --git a/h-client/hlibrary.py b/h-client/hlibrary.py
index 7f9d900..0b3613c 100644
--- a/h-client/hlibrary.py
+++ b/h-client/hlibrary.py
@@ -502,6 +502,22 @@ class Client:
'type' : 'printer',
'controller': 'printers'
},
+ 'e00101' : {
+ 'type' : 'bluetooth',
+ 'controller': 'bluetooth'
+ },
+ '020205' : {
+ 'type' : '3G-card',
+ 'controller': 'threegcards'
+ },
+ '0e0100' : {
+ 'type' : 'webcam',
+ 'controller': 'webcams'
+ },
+ 'ff0100' : {
+ 'type' : 'webcam',
+ 'controller': 'webcams'
+ },
'255255255' : {
'type' : 'unknown',
'controller': 'unknown'
@@ -718,7 +734,7 @@ class Client:
self.errors.append('tmp folder not writable')
- #parse the output of the lspci command
+ #parse the output of the lsusb command
if not os.system('lsusb -v > tmp/temp'):
f = open('tmp/temp','r')
@@ -833,9 +849,6 @@ class Client:
code = device.getElementsByTagName("vendorid_productid")[0]
if code.hasChildNodes():
if (code.childNodes[0].data == vendorid_productid):
-
-
-
modelName = device.getElementsByTagName("model_name")[0].childNodes[0].data.encode('utf-8')
interface = device.getElementsByTagName("interface")[0].childNodes[0].data.encode('utf-8')
distribution = device.getElementsByTagName("distribution")[0].childNodes[0].data.encode('utf-8')
@@ -844,9 +857,10 @@ class Client:
if deviceType == 'printer' or deviceType == 'scanner':
works = device.getElementsByTagName("compatibility")[0].childNodes[0].data.encode('utf-8')
- #set the subtype
- subtype = device.getElementsByTagName("subtype")[0].childNodes[0].data.encode('utf-8')
- dev[0].setSubtype(subtype)
+ if deviceType == 'printer':
+ #set the subtype
+ subtype = device.getElementsByTagName("subtype")[0].childNodes[0].data.encode('utf-8')
+ dev[0].setSubtype(subtype)
else:
works = device.getElementsByTagName("it_works")[0].childNodes[0].data.encode('utf-8')