Changeset 2528

Show
Ignore:
Timestamp:
09/30/05 17:54:30 (19 years ago)
Author:
jerome
Message:

Fixed a cache usage when storagecache was not defined.

Files:
1 modified

Legend:

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

    r2513 r2528  
    101101            self.parent.commitTransaction() 
    102102            self.parent.flushEntry("USERS", self.Name) 
    103             for (k, v) in self.parent.caches["USERPQUOTAS"].items() : 
    104                 if v.User.Name == self.Name : 
    105                     self.parent.flushEntry("USERPQUOTAS", "%s@%s" % (v.User.Name, v.Printer.Name)) 
     103            if self.usecache : 
     104                for (k, v) in self.parent.caches["USERPQUOTAS"].items() : 
     105                    if v.User.Name == self.Name : 
     106                        self.parent.flushEntry("USERPQUOTAS", "%s@%s" % (v.User.Name, v.Printer.Name)) 
    106107            self.Exists = 0 
    107108