Changeset 1808 for pykota/trunk

Show
Ignore:
Timestamp:
10/12/04 11:14:03 (20 years ago)
Author:
jalet
Message:

Ensures that warnpykota still test other quota entries for each user if
he has not been warned, even if limited by his account balance.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/warnpykota

    r1807 r1808  
    2424# 
    2525# $Log$ 
     26# Revision 1.35  2004/10/12 09:14:03  jalet 
     27# Ensures that warnpykota still test other quota entries for each user if 
     28# he has not been warned, even if limited by his account balance. 
     29# 
    2630# Revision 1.34  2004/10/12 09:09:04  jalet 
    2731# Now warnpykota warns users limited by balance only once per launch. 
     
    247251                       userpquota.PageCounter or userpquota.LifePageCounter or \ 
    248252                       self.storage.getUserNbJobsFromHistory(user) : 
    249                         if (user.LimitBy.lower() != 'balance') or not alreadydone.get(user.Name) : 
    250                             self.warnUserPQuota(userpquota) 
    251                         alreadydone[user.Name] = 1 
     253                        done = alreadydone.get(user.Name) 
     254                        if (user.LimitBy.lower() != 'balance') or not done : 
     255                            action = self.warnUserPQuota(userpquota) 
     256                            if not done : 
     257                                alreadydone[user.Name] = (action in ('WARN', 'DENY')) 
    252258                      
    253259if __name__ == "__main__" :