Changeset 1806 for pykota/trunk/bin

Show
Ignore:
Timestamp:
10/12/04 10:58:53 (20 years ago)
Author:
jalet
Message:

Now warnpykota only warns users who have already printed, to not confuse
users who have just opened their account.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/warnpykota

    r1803 r1806  
    2424# 
    2525# $Log$ 
     26# Revision 1.33  2004/10/12 08:58:53  jalet 
     27# Now warnpykota only warns users who have already printed, to not confuse 
     28# users who have just opened their account. 
     29# 
    2630# Revision 1.32  2004/10/11 22:53:05  jalet 
    2731# Postponed string interpolation to help message's output method 
     
    234238            else : 
    235239                for (user, userpquota) in self.storage.getPrinterUsersAndQuotas(printer, ugnames) : 
    236                     self.warnUserPQuota(userpquota) 
     240                    # we only want to warn users who have ever printed something 
     241                    # and don't want to warn users who have never printed 
     242                    if (user.AccountBalance and (user.AccountBalance != user.LifeTimePaid)) or \ 
     243                       userpquota.PageCounter or userpquota.LifePageCounter or \ 
     244                       self.storage.getUserNbJobsFromHistory(user) : 
     245                        self.warnUserPQuota(userpquota) 
    237246                      
    238247if __name__ == "__main__" :