Blame SOURCES/hplip-avahi-parsing.patch
|
|
986012 |
diff -up hplip-3.15.2/base/avahi.py.parsing hplip-3.15.2/base/avahi.py
|
|
|
986012 |
--- hplip-3.15.2/base/avahi.py.parsing 2015-02-04 15:43:37.662551377 +0100
|
|
|
986012 |
+++ hplip-3.15.2/base/avahi.py 2015-02-04 15:45:56.576564858 +0100
|
|
|
986012 |
@@ -52,9 +52,14 @@ def detectNetworkDevices(ttl=4, timeout=
|
|
|
986012 |
'status_code': 0, 'device2': '0', 'device3': '0', 'note': ''}
|
|
|
986012 |
y['ip'] = ip
|
|
|
986012 |
y['hn'] = bits[6].replace('.local', '')
|
|
|
986012 |
- details = bits[9].split('" "')
|
|
|
986012 |
+ details = bits[9].rstrip ().strip ('"').split('" "')
|
|
|
986012 |
for item in details:
|
|
|
986012 |
key, value = item.split('=', 1)
|
|
|
986012 |
+ keyvalue = item.split('=', 1)
|
|
|
986012 |
+ if len (keyvalue) < 2:
|
|
|
986012 |
+ # Skip parts that don't match key=value
|
|
|
986012 |
+ continue
|
|
|
986012 |
+ key, value = keyvalue
|
|
|
986012 |
if key == 'ty':
|
|
|
986012 |
y['mdns'] = value
|
|
|
986012 |
y['device1'] = "MFG:Hewlett-Packard;MDL:%s;CLS:PRINTER;" % value
|