Changeset 2211 for pykota/trunk
- Timestamp:
- 04/20/05 13:18:36 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r2210 r2211 22 22 PyKota NEWS : 23 23 24 - 1.22alpha7 : 25 26 - Fixed some problems with the retrieval of the history from LDAP. 27 24 28 - 1.22alpha6 : 25 29 -
pykota/trunk/pykota/storages/ldapstorage.py
r2191 r2211 490 490 result = None 491 491 try : 492 result = self.doSearch("objectClass=pykotaJob", ["pykotaJobSizeBytes", "pykotaHostName", "pykotaUserName", "pykotaJobId", "pykotaPrinterPageCounter", "pykotaJobSize", "pykotaAction", "pykotaJobPrice", "pykotaFileName", "pykotaTitle", "pykotaCopies", "pykotaOptions", "pykotaBillingCode", "pykotaPages", "pykotaMD5Sum", "createTimestamp"], base="cn=%s,%s" % (lastjobident, self.info["jobbase"]), scope=ldap.SCOPE_BASE) 492 result = self.doSearch("objectClass=pykotaJob", [ "pykotaJobSizeBytes", 493 "pykotaHostName", 494 "pykotaUserName", 495 "pykotaPrinterName", 496 "pykotaJobId", 497 "pykotaPrinterPageCounter", 498 "pykotaJobSize", 499 "pykotaAction", 500 "pykotaJobPrice", 501 "pykotaFileName", 502 "pykotaTitle", 503 "pykotaCopies", 504 "pykotaOptions", 505 "pykotaBillingCode", 506 "pykotaPages", 507 "pykotaMD5Sum", 508 "createTimestamp" ], 509 base="cn=%s,%s" % (lastjobident, self.info["jobbase"]), scope=ldap.SCOPE_BASE) 493 510 except PyKotaStorageError : 494 511 pass # Last job entry exists, but job probably doesn't exist anymore. … … 514 531 lastjob.JobHostName = fields.get("pykotaHostName", [""])[0] 515 532 lastjob.JobSizeBytes = fields.get("pykotaJobSizeBytes", [0L])[0] 516 lastjob.JobBillingCode = fields.get("pykota MD5Sum", [None])[0]533 lastjob.JobBillingCode = fields.get("pykotaBillingCode", [None])[0] 517 534 lastjob.JobMD5Sum = fields.get("pykotaMD5Sum", [None])[0] 518 535 lastjob.JobPages = fields.get("pykotaPages", [""])[0] … … 1033 1050 where = precond 1034 1051 jobs = [] 1035 result = self.doSearch(where, fields=["pykotaJobSizeBytes", "pykotaHostName", "pykotaUserName", "pykotaPrinterName", "pykotaJobId", "pykotaPrinterPageCounter", "pykotaAction", "pykotaJobSize", "pykotaJobPrice", "pykotaFileName", "pykotaTitle", "pykotaCopies", "pykotaOptions", "createTimestamp"], base=self.info["jobbase"]) 1052 result = self.doSearch(where, fields=[ "pykotaJobSizeBytes", 1053 "pykotaHostName", 1054 "pykotaUserName", 1055 "pykotaPrinterName", 1056 "pykotaJobId", 1057 "pykotaPrinterPageCounter", 1058 "pykotaAction", 1059 "pykotaJobSize", 1060 "pykotaJobPrice", 1061 "pykotaFileName", 1062 "pykotaTitle", 1063 "pykotaCopies", 1064 "pykotaOptions", 1065 "pykotaBillingCode", 1066 "pykotaPages", 1067 "pykotaMD5Sum", 1068 "createTimestamp" ], 1069 base=self.info["jobbase"]) 1036 1070 if result : 1037 1071 for (ident, fields) in result : … … 1055 1089 job.JobHostName = fields.get("pykotaHostName", [""])[0] 1056 1090 job.JobSizeBytes = fields.get("pykotaJobSizeBytes", [0L])[0] 1091 job.JobBillingCode = fields.get("pykotaBillingCode", [None])[0] 1092 job.JobMD5Sum = fields.get("pykotaMD5Sum", [None])[0] 1093 job.JobPages = fields.get("pykotaPages", [""])[0] 1057 1094 date = fields.get("createTimestamp", ["19700101000000"])[0] 1058 1095 year = int(date[:4]) … … 1289 1326 entries = self.retrieveHistory(user, printer, limit=None) 1290 1327 if entries : 1291 result = [ ("username", "printername", "dn", "jobid", "pagecounter", "jobsize", "action", "jobdate", "filename", "title", "copies", "options", "jobprice", "hostname", "jobsizebytes" ) ]1328 result = [ ("username", "printername", "dn", "jobid", "pagecounter", "jobsize", "action", "jobdate", "filename", "title", "copies", "options", "jobprice", "hostname", "jobsizebytes", "md5sum", "pages", "billingcode") ] 1292 1329 for entry in entries : 1293 result.append((entry.UserName, entry.PrinterName, entry.ident, entry.JobId, entry.PrinterPageCounter, entry.JobSize, entry.JobAction, entry.JobDate, entry.JobFileName, entry.JobTitle, entry.JobCopies, entry.JobOptions, entry.JobPrice, entry.JobHostName, entry.JobSizeBytes ))1330 result.append((entry.UserName, entry.PrinterName, entry.ident, entry.JobId, entry.PrinterPageCounter, entry.JobSize, entry.JobAction, entry.JobDate, entry.JobFileName, entry.JobTitle, entry.JobCopies, entry.JobOptions, entry.JobPrice, entry.JobHostName, entry.JobSizeBytes, entry.JobMD5Sum, entry.JobPages, entry.JobBillingCode)) 1294 1331 return result -
pykota/trunk/pykota/version.py
r2210 r2211 22 22 # 23 23 24 __version__ = "1.22alpha 6_unofficial"24 __version__ = "1.22alpha7_unofficial" 25 25 26 26 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""