Changeset 3146 for pykota/trunk/bin
- Timestamp:
- 02/20/07 23:36:46 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r3141 r3146 438 438 jobticketcommand = self.config.getOverwriteJobTicket(self.PrinterName) 439 439 if jobticketcommand : 440 username = billingcode = action = None440 username = billingcode = action = reason = None 441 441 self.logdebug("Launching subprocess [%s] to overwrite the job ticket." \ 442 442 % jobticketcommand) … … 458 458 billingcode = self.userCharsetToUTF8(line.split("=", 1)[1].strip()) 459 459 self.logdebug("Seen new billing code [%s]" % billingcode) 460 elif line.startswith("REASON=") : 461 reason = self.userCharsetToUTF8(line.split("=", 1)[1].strip()) 462 self.logdebug("Seen new reason [%s]" % reason) 460 463 except IOError, msg : 461 464 self.logdebug("IOError while reading subprocess' output : %s" % msg) … … 466 469 if action == "DENY" : 467 470 self.Action = action 468 self.Reason = _("You are not allowed to print at this time.")471 self.Reason = (reason or _("You are not allowed to print at this time.")) 469 472 elif action == "CANCEL" : 470 473 self.Action = action 471 self.Reason = _("Print job cancelled.")474 self.Reason = (reason or _("Print job cancelled.")) 472 475 os.environ["PYKOTASTATUS"] = "CANCELLED" 473 476 else :