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