Show
Ignore:
Timestamp:
07/17/04 22:37:27 (20 years ago)
Author:
jalet
Message:

Missing file... Am I really stupid ?

Files:
1 modified

Legend:

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

    r1584 r1601  
    2222# 
    2323# $Log$ 
     24# Revision 1.73  2004/07/17 20:37:27  jalet 
     25# Missing file... Am I really stupid ? 
     26# 
    2427# Revision 1.72  2004/07/01 19:56:43  jalet 
    2528# Better dispatching of error messages 
     
    637640                lastjob.UserName = fields.get("pykotaUserName")[0] 
    638641                lastjob.PrinterPageCounter = int(fields.get("pykotaPrinterPageCounter", [0])[0] or 0) 
    639                 lastjob.JobSize = int(fields.get("pykotaJobSize", [0])[0]) 
    640                 lastjob.JobPrice = float(fields.get("pykotaJobPrice", [0.0])[0]) 
     642                try : 
     643                    lastjob.JobSize = int(fields.get("pykotaJobSize", [0])[0]) 
     644                except ValueError :     
     645                    lastjob.JobSize = None 
     646                try :     
     647                    lastjob.JobPrice = float(fields.get("pykotaJobPrice", [0.0])[0]) 
     648                except ValueError :     
     649                    lastjob.JobPrice = None 
    641650                lastjob.JobAction = fields.get("pykotaAction", [""])[0] 
    642651                lastjob.JobFileName = fields.get("pykotaFileName", [""])[0] 
     
    11011110                job.JobId = fields.get("pykotaJobId")[0] 
    11021111                job.PrinterPageCounter = int(fields.get("pykotaPrinterPageCounter", [0])[0] or 0) 
    1103                 job.JobSize = int(fields.get("pykotaJobSize", [0])[0]) 
    1104                 job.JobPrice = float(fields.get("pykotaJobPrice", [0.0])[0]) 
     1112                try : 
     1113                    job.JobSize = int(fields.get("pykotaJobSize", [0])[0]) 
     1114                except ValueError :     
     1115                    job.JobSize = None 
     1116                try :     
     1117                    job.JobPrice = float(fields.get("pykotaJobPrice", [0.0])[0]) 
     1118                except ValueError : 
     1119                    job.JobPrice = None 
    11051120                job.JobAction = fields.get("pykotaAction", [""])[0] 
    11061121                job.JobFileName = fields.get("pykotaFileName", [""])[0]