Hi

I forgot to declare the int before the loop :(, so the patch broke current 
standard behaviour. Please find the updated patch attached.

Cheers
Steffen
--- ../foomatic-gui/foomatic/detect.py	2008-12-10 14:19:26.000000000 +0100
+++ foomatic/detect.py	2008-12-11 10:57:29.000000000 +0100
@@ -142,14 +142,27 @@
     conns = []
     # Figure out what special files are used on this system
     format = None
+    int = 0
     for fmt in ('/dev/usb/lp%d', '/dev/usb/usblp%d', '/dev/usblp%d'):
-        if os.path.exists(fmt % 0):
+	if os.path.exists(fmt % 0):
             format = fmt
             break
+	else:
+	    for i in range(USB_MAX):
+		if os.path.exists(fmt % i):
+	            format = fmt
+		    int = i
+		    break
+	if format:
+		break
+
     if not format:
+
         return conns
 
     for i in range(USB_MAX):
+	if i < int:
+		continue
         device = format % i
         if not os.path.exists(device): continue
         data = read_ieee1284_data(device)

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to