Show
Ignore:
Timestamp:
08/28/05 12:45:51 (19 years ago)
Author:
jerome
Message:

The cupspykota backend was rewritten from scratch. MacOSX servers should
work just fine now.
Severity : High. Testers MORE than welcome :-)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storage.py

    r2388 r2409  
    296296        jobprice = self.computeJobPrice(jobsize) 
    297297        if jobsize : 
    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 
    311304        return jobprice 
    312305