Changeset 3146 for pykota/trunk
- Timestamp:
- 02/20/07 23:36:46 (18 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 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 : -
pykota/trunk/conf/pykota.conf.sample
r3133 r3146 455 455 # USERNAME=the_username_we_want_to_overwrite_with 456 456 # BILLINGCODE=the_billingcode_we_want_to_overwrite_with 457 # REASON=reason_we_chose_deny_or_cancel 457 458 # AUTH=NO (equivalent to DENY below) 458 459 # DENY … … 467 468 # used unchanged. 468 469 # If DENY or CANCEL is output, neither the username nor the 469 # billing code can be overwritten. 470 # billing code can be overwritten. 471 # If REASON is output, that will be used in the notification in the case of 472 # DENY or CANCEL. Otherwise, the built-in reasons will be used. 470 473 # 471 474 # This value can be set either globally or on a per printer basis