Changeset 1601
- Timestamp:
- 07/17/04 22:37:27 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 1 added
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/ldapstorage.py
r1584 r1601 22 22 # 23 23 # $Log$ 24 # Revision 1.73 2004/07/17 20:37:27 jalet 25 # Missing file... Am I really stupid ? 26 # 24 27 # Revision 1.72 2004/07/01 19:56:43 jalet 25 28 # Better dispatching of error messages … … 637 640 lastjob.UserName = fields.get("pykotaUserName")[0] 638 641 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 641 650 lastjob.JobAction = fields.get("pykotaAction", [""])[0] 642 651 lastjob.JobFileName = fields.get("pykotaFileName", [""])[0] … … 1101 1110 job.JobId = fields.get("pykotaJobId")[0] 1102 1111 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 1105 1120 job.JobAction = fields.get("pykotaAction", [""])[0] 1106 1121 job.JobFileName = fields.get("pykotaFileName", [""])[0] -
pykota/trunk/pykota/tool.py
r1600 r1601 22 22 # 23 23 # $Log$ 24 # Revision 1.113 2004/07/17 20:37:27 jalet 25 # Missing file... Am I really stupid ? 26 # 24 27 # Revision 1.112 2004/07/16 12:22:47 jalet 25 28 # LPRng support early version … … 918 921 self.options, \ 919 922 self.originalbackend) = self.extractInfoFromCupsOrLprng() 923 924 self.logdebug(_("Printing system %s, args=%s") % (str(self.printingsystem), " ".join(sys.argv))) 925 920 926 self.username = self.username or 'root' # when printing test page from CUPS web interface, username is empty 921 927 if self.config.getUserNameToLower() : … … 1113 1119 rseen = "localhost" 1114 1120 try : 1115 df_name = [line[8:] for line in os.environ.get("HF" ).split() if line.startswith("df_name=")][0]1121 df_name = [line[8:] for line in os.environ.get("HF", "").split() if line.startswith("df_name=")][0] 1116 1122 except IndexError : 1117 1123 inputfile = None