Changeset 1372 for pykota/trunk/bin/cupspykota
- Timestamp:
- 03/01/04 12:23:25 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r1365 r1372 24 24 # 25 25 # $Log$ 26 # Revision 1.29 2004/03/01 11:23:25 jalet 27 # Pre and Post hooks to external commands are available in the cupspykota 28 # backend. Forthe pykota filter they will be implemented real soon now. 29 # 26 30 # Revision 1.28 2004/02/26 14:18:07 jalet 27 31 # Should fix the remaining bugs wrt printers groups and users groups. … … 201 205 # be allowed if current user is allowed to print on this printer 202 206 if policy == "OK" : 207 # exports user information with initial values 208 self.exportUserInfo(userpquota) 209 210 # checks the user's quota 203 211 action = self.warnUserPQuota(userpquota) 212 213 # exports some new environment variables 214 os.putenv("PYKOTAACTION", action) 215 216 # launches the pre hook 217 self.prehook(userpquota) 218 204 219 self.logdebug("Job accounting begins.") 205 220 self.accounter.beginJob(userpquota) … … 236 251 printer.addJobToHistory(self.jobid, user, self.accounter.getLastPageCounter(), action, jobsize, jobprice, self.preserveinputfile, self.title, self.copies, self.options) 237 252 self.logdebug("Job added to history.") 253 254 # exports some new environment variables 255 os.putenv("PYKOTAJOBSIZE", str(jobsize)) 256 os.putenv("PYKOTAJOBPRICE", str(jobprice)) 257 258 # then re-export user information with new values 259 self.exportUserInfo(userpquota) 260 261 # Launches the post hook 262 self.posthook(userpquota) 238 263 239 264 return retcode