Changeset 3269
- Timestamp:
- 12/10/07 22:54:17 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pkprinters
r3260 r3269 156 156 return cups.doRequest(req).printer["device-uri"][0][1] 157 157 except : 158 self.printInfo(_("Impossible to retrieve %(printername)s's DeviceURI") % locals(), "warn") 158 159 return "" 159 160 … … 168 169 """Reroutes a CUPS printer through PyKota.""" 169 170 uri = self.getPrinterDeviceURI(printer.Name) 170 if not self.isPrinterCaptured(deviceuri=uri) :171 if uri and (not self.isPrinterCaptured(deviceuri=uri)) : 171 172 newuri = "cupspykota://%s" % uri 172 173 self.regainPriv() # to avoid having to enter password. … … 178 179 """Deroutes a PyKota printer through CUPS only.""" 179 180 uri = self.getPrinterDeviceURI(printer.Name) 180 if self.isPrinterCaptured(deviceuri=uri) :181 if uri and self.isPrinterCaptured(deviceuri=uri) : 181 182 newuri = uri.replace("cupspykota:", "") 182 183 if newuri.startswith("//") :