Changeset 3394 for pykota/branches

Show
Ignore:
Timestamp:
07/10/08 21:47:46 (16 years ago)
Author:
jerome
Message:

Backported a fix for pkprinters. Fixes #18.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/branches/1.26_fixes/bin/pkprinters

    r3133 r3394  
    171171        """Reroutes a CUPS printer through PyKota.""" 
    172172        uri = self.getPrinterDeviceURI(printer.Name) 
    173         if not self.isPrinterCaptured(deviceuri=uri) : 
     173        if uri and (not self.isPrinterCaptured(deviceuri=uri)) : 
    174174             newuri = "cupspykota://%s" % uri 
    175175             self.regainPriv() # to avoid having to enter password. 
     
    181181        """Deroutes a PyKota printer through CUPS only.""" 
    182182        uri = self.getPrinterDeviceURI(printer.Name) 
    183         if self.isPrinterCaptured(deviceuri=uri) : 
     183        if uri and self.isPrinterCaptured(deviceuri=uri) : 
    184184             newuri = uri.replace("cupspykota:", "") 
    185185             if newuri.startswith("//") :