298 | | self.parent.beginTransaction() |
299 | | try : |
300 | | if jobprice : |
301 | | self.User.consumeAccountBalance(jobprice) |
302 | | for upq in [ self ] + self.ParentPrintersUserPQuota : |
303 | | self.parent.increaseUserPQuotaPagesCounters(upq, jobsize) |
304 | | upq.PageCounter = int(upq.PageCounter or 0) + jobsize |
305 | | upq.LifePageCounter = int(upq.LifePageCounter or 0) + jobsize |
306 | | except PyKotaStorageError, msg : |
307 | | self.parent.rollbackTransaction() |
308 | | raise PyKotaStorageError, msg |
309 | | else : |
310 | | self.parent.commitTransaction() |
| 298 | if jobprice : |
| 299 | self.User.consumeAccountBalance(jobprice) |
| 300 | for upq in [ self ] + self.ParentPrintersUserPQuota : |
| 301 | self.parent.increaseUserPQuotaPagesCounters(upq, jobsize) |
| 302 | upq.PageCounter = int(upq.PageCounter or 0) + jobsize |
| 303 | upq.LifePageCounter = int(upq.LifePageCounter or 0) + jobsize |