Changeset 3545 for pykota/trunk
- Timestamp:
- 04/27/10 23:38:18 (15 years ago)
- Location:
- pykota/trunk
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r3489 r3545 380 380 self.logdebug("Launching subprocess [%s] to ask for user confirmation." \ 381 381 % confirmationcommand) 382 inputfile = os.popen(confirmationcommand , "r")382 inputfile = os.popen(confirmationcommand.encode(self.charset, "replace"), "r") 383 383 try : 384 384 for answer in inputfile.xreadlines() : … … 402 402 self.logdebug("Launching subprocess [%s] to overwrite the job ticket." \ 403 403 % jobticketcommand) 404 inputfile = os.popen(jobticketcommand , "r")404 inputfile = os.popen(jobticketcommand.encode(self.charset, "replace"), "r") 405 405 try : 406 406 for line in inputfile.xreadlines() : … … 620 620 if prehook : 621 621 self.logdebug("Executing pre-hook [%s]..." % prehook) 622 retcode = os.system(prehook )622 retcode = os.system(prehook.encode(self.charset, "replace")) 623 623 self.logdebug("pre-hook exited with status %s." % retcode) 624 624 … … 628 628 if posthook : 629 629 self.logdebug("Executing post-hook [%s]..." % posthook) 630 retcode = os.system(posthook )630 retcode = os.system(posthook.encode(self.charset, "replace")) 631 631 self.logdebug("post-hook exited with status %s." % retcode) 632 632 … … 672 672 not os.path.isfile(bannerfileorcommand) : 673 673 self.logdebug("Launching %s to generate a banner." % bannerfileorcommand) 674 child = popen2.Popen3(bannerfileorcommand , capturestderr=1)674 child = popen2.Popen3(bannerfileorcommand.encode(self.charset, "replace"), capturestderr=1) 675 675 self.runOriginalBackend(child.fromchild, isBanner=1) 676 676 child.tochild.close() … … 808 808 if not userpquota.Exists : 809 809 self.printInfo(_("User %s doesn't have quota on printer %s in the PyKota system, applying external policy (%s) for printer %s") % (self.UserName, self.PrinterName, commandline, self.PrinterName)) 810 if os.system(commandline ) :810 if os.system(commandline.encode(self.charset, "replace")) : 811 811 self.printInfo(_("External policy %s for printer %s produced an error. Job rejected. Please check PyKota's configuration files.") % (commandline, self.PrinterName), "error") 812 812 policy = "EXTERNALERROR" … … 863 863 if script is not None : 864 864 self.logdebug(msg + "launching subprocess [%s] to notify user." % script) 865 os.system(script )865 os.system(script.encode(self.charset, "replace")) 866 866 self.logdebug("Retrieval of billing code information done.") 867 867 … … 894 894 # TODO : important, because usually duplicate jobs are sucessive. 895 895 msg = _("Job is a dupe") 896 if denyduplicates == 1:896 if denyduplicates is True : 897 897 self.printInfo("%s : %s." % (msg, _("Printing is denied by configuration")), "warn") 898 898 self.Action = "DENY" … … 900 900 else : 901 901 self.logdebug("Launching subprocess [%s] to see if duplicate jobs should be allowed or not." % denyduplicates) 902 fanswer = os.popen(denyduplicates , "r")902 fanswer = os.popen(denyduplicates.encode(self.charset, "replace"), "r") 903 903 self.Action = fanswer.read().strip().upper() 904 904 fanswer.close() -
pykota/trunk/pykota/tool.py
r3489 r3545 486 486 def externalMailTo(self, cmd, action, user, printer, message) : 487 487 """Warns the user with an external command.""" 488 cmd = cmd.encode(self.charset, "replace") 488 489 message = message.encode(self.charset, "replace") 489 490 username = user.Name -
pykota/trunk/pykota/version.py
r3533 r3545 24 24 import time 25 25 26 __version__ = "1.27alpha1 0_unofficial"26 __version__ = "1.27alpha11_unofficial" 27 27 28 28 __doc__ = "PyKota : a complete Printing Quota Solution for CUPS."