Show
Ignore:
Timestamp:
09/18/05 00:08:28 (19 years ago)
Author:
jerome
Message:

Did some work to prepare the integration of MaxJobSize? and PassThrough?
mode for printers.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/sql.py

    r2455 r2459  
    214214            printer.PricePerJob = fields.get("priceperjob") or 0.0 
    215215            printer.PricePerPage = fields.get("priceperpage") or 0.0 
     216            printer.MaxJobSize = fields.get("maxjobsize") or 0 
     217            printer.PassThrough = fields.get("passthrough") or 0 
     218            if printer.PassThrough in (1, "1", "t", "true", "TRUE", "True") : 
     219                printer.PassThrough = 1 
     220            else : 
     221                printer.PassThrough = 0 
    216222            printer.Description = self.databaseToUserCharset(fields.get("description") or "") 
    217223            printer.Exists = 1 
     
    352358                    printer.PricePerPage = record.get("priceperpage") or 0.0 
    353359                    printer.Description = self.databaseToUserCharset(record.get("description") or "")  
     360                    printer.MaxJobSize = record.get("maxjobsize") or 0 
     361                    printer.PassThrough = record.get("passthrough") or 0 
     362                    if printer.PassThrough in (1, "1", "t", "true", "TRUE", "True") : 
     363                        printer.PassThrough = 1 
     364                    else : 
     365                        printer.PassThrough = 0 
    354366                    printer.Exists = 1 
    355367                    printers.append(printer)