Changeset 1807

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

Now warnpykota warns users limited by balance only once per launch.

Location:
pykota/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/warnpykota

    r1806 r1807  
    2424# 
    2525# $Log$ 
     26# Revision 1.34  2004/10/12 09:09:04  jalet 
     27# Now warnpykota warns users limited by balance only once per launch. 
     28# 
    2629# Revision 1.33  2004/10/12 08:58:53  jalet 
    2730# Now warnpykota only warns users who have already printed, to not confuse 
     
    237240                    self.warnGroupPQuota(grouppquota) 
    238241            else : 
     242                alreadydone = {} 
    239243                for (user, userpquota) in self.storage.getPrinterUsersAndQuotas(printer, ugnames) : 
    240244                    # we only want to warn users who have ever printed something 
     
    243247                       userpquota.PageCounter or userpquota.LifePageCounter or \ 
    244248                       self.storage.getUserNbJobsFromHistory(user) : 
    245                         self.warnUserPQuota(userpquota) 
     249                        if (user.LimitBy.lower() != 'balance') or not alreadydone.get(user.Name) : 
     250                            self.warnUserPQuota(userpquota) 
     251                        alreadydone[user.Name] = 1 
    246252                      
    247253if __name__ == "__main__" :  
  • pykota/trunk/NEWS

    r1806 r1807  
    2424    - 1.20alpha24 : 
    2525     
     26        - Now warnpykota only warns users limited by balance once. 
     27         
    2628        - Now warnpykota only warns users who have ever printed, 
    2729          to not cause confusion to users who have just opened