Changeset 733 for pykota/trunk/pykota/tool.py
- Timestamp:
- 02/07/03 09:34:16 (21 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r729 r733 15 15 # 16 16 # $Log$ 17 # Revision 1.13 2003/02/07 08:34:16 jalet 18 # Test wrt date limit was wrong 19 # 17 20 # Revision 1.12 2003/02/06 23:20:02 jalet 18 21 # warnpykota doesn't need any user/group name argument, mimicing the … … 177 180 def checkUserPQuota(self, username, printername) : 178 181 """Checks the user quota on a printer and deny or accept the job.""" 179 now = DateTime.now()180 182 quota = self.storage.getUserPQuota(username, printername) 181 183 if quota is None : … … 199 201 action = "ALLOW" 200 202 elif hardlimit is not None : 201 gracedelay = self.config.getGraceDelay()202 203 if softlimit <= pagecounter < hardlimit : 204 now = DateTime.now() 203 205 if datelimit is None : 204 datelimit = now + gracedelay206 datelimit = now + self.config.getGraceDelay() 205 207 self.storage.setDateLimit(username, printername, datelimit) 206 if (now + gracedelay)< datelimit :208 if now < datelimit : 207 209 action = "WARN" 208 210 else :