Changeset 3299 for pykota/trunk/bin
- Timestamp:
- 01/24/08 10:37:53 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r3298 r3299 301 301 self.OriginalJobBillingCode = None 302 302 else : 303 self.Ticket.BillingCode = self.UTF8ToUserCharset(self.Ticket.BillingCode) 303 self.Ticket.BillingCode = self.UTF8ToUserCharset(self.Ticket.BillingCode).decode("UTF-8") 304 304 self.OriginalJobBillingCode = self.Ticket.BillingCode[:] 305 305 … … 416 416 action = "CANCEL" 417 417 elif line.startswith("USERNAME=") : 418 username = self.userCharsetToUTF8(line.split("=", 1)[1].strip()) 418 username = self.userCharsetToUTF8(line.split("=", 1)[1].strip()).decode("UTF-8") 419 419 self.logdebug("Seen new username [%s]" % username) 420 420 elif line.startswith("BILLINGCODE=") : 421 billingcode = self.userCharsetToUTF8(line.split("=", 1)[1].strip()) 421 billingcode = self.userCharsetToUTF8(line.split("=", 1)[1].strip()).decode("UTF-8") 422 422 self.logdebug("Seen new billing code [%s]" % billingcode) 423 423 elif line.startswith("REASON=") : 424 reason = self.userCharsetToUTF8(line.split("=", 1)[1].strip()) 424 reason = self.userCharsetToUTF8(line.split("=", 1)[1].strip()).decode("UTF-8") 425 425 self.logdebug("Seen new reason [%s]" % reason) 426 426 except IOError, msg : … … 559 559 setenv("PYKOTABALANCE", str(self.User.AccountBalance or 0.0), self.charset) 560 560 setenv("PYKOTALIFETIMEPAID", str(self.User.LifeTimePaid or 0.0), self.charset) 561 setenv("PYKOTAUSERDESCRIPTION", s tr(self.User.Description or ""), self.charset)561 setenv("PYKOTAUSERDESCRIPTION", self.User.Description or "", self.charset) 562 562 563 563 setenv("PYKOTAPAGECOUNTER", str(self.UserPQuota.PageCounter or 0), self.charset) … … 579 579 # printer is a member of 580 580 setenv("PYKOTAPGROUPS", ",".join([p.Name for p in self.storage.getParentPrinters(self.Printer)]), self.charset) 581 setenv("PYKOTAPRINTERDESCRIPTION", s tr(self.Printer.Description or ""), self.charset)581 setenv("PYKOTAPRINTERDESCRIPTION", self.Printer.Description or "", self.charset) 582 582 setenv("PYKOTAPRINTERMAXJOBSIZE", str(self.Printer.MaxJobSize or _("Unlimited")), self.charset) 583 583 setenv("PYKOTAPRINTERPASSTHROUGHMODE", (self.Printer.PassThrough and _("ON")) or _("OFF"), self.charset) … … 602 602 """Exports the job's action status and optional reason.""" 603 603 self.logdebug("Exporting job's action status...") 604 setenv("PYKOTAACTION", s tr(self.Action), self.charset)604 setenv("PYKOTAACTION", self.Action or "", self.charset) 605 605 if self.Reason : 606 setenv("PYKOTAREASON", s tr(self.Reason), self.charset)606 setenv("PYKOTAREASON", self.Reason or "", self.charset) 607 607 self.logdebug("Environment updated.") 608 608