Changeset 2254 for pykota/trunk/bin/cupspykota
- Timestamp:
- 05/17/05 22:24:40 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r2239 r2254 40 40 from pykota.storage import PyKotaStorageError 41 41 from pykota.accounter import PyKotaAccounterError 42 from pykota.ipp import IPPMessage, PyKotaIPPError42 from pykota.ipp import IPPMessage, IPPError 43 43 44 44 class PyKotaPopen4(popen2.Popen4) : … … 215 215 ippdatafile.close() 216 216 self.dropPriv() 217 clienthost = ippmessage.get("job-originating-host-name") 218 billingcode = ippmessage.get("job-billing") 217 218 try : 219 (chtype, clienthost) = ippmessage.operation_attributes.get("job-originating-host-name", \ 220 ippmessage.job_attributes.get("job-originating-host-name", (None, None))) 221 (jbtype, billingcode) = ippmessage.job_attributes.get("job-billing", (None, None)) 222 except AttributeError : 223 clienthost = None 224 billingcode = None 219 225 if clienthost is None : 220 226 (billingcode, clienthost) = self.getJobInfosFromPageLog(cupsdconf, printer.Name, user.Name, self.jobid) 221 227 self.logdebug("Client Hostname : %s" % (clienthost or "Unknown")) 222 228 self.logdebug("Billing Code : %s" % (billingcode or "None")) 229 223 230 os.environ["PYKOTAJOBORIGINATINGHOSTNAME"] = str(clienthost or "") 224 231 os.environ["PYKOTAJOBBILLING"] = str(billingcode or "")