Changeset 1062 for pykota/trunk
- Timestamp:
- 07/05/03 09:46:50 (21 years ago)
- Location:
- pykota/trunk
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/NEWS
r1061 r1062 22 22 PyKota NEWS : 23 23 24 - 1.12alpha2 : 25 26 - The previous bug fix was incomplete. This is corrected. 27 24 28 - 1.12alpha1 : 25 29 -
pykota/trunk/pykota/reporters/text.py
r1056 r1062 21 21 # 22 22 # $Log$ 23 # Revision 1.3 2003/07/05 07:46:50 jalet 24 # The previous bug fix was incomplete. 25 # 23 26 # Revision 1.2 2003/07/02 09:29:12 jalet 24 27 # Bug fixed when wanting a report and an user/group was limited by account balance … … 84 87 lifetimepaid = float(entry.LifeTimePaid or 0.0) 85 88 86 if entry.LimitBy .lower() == "balance":89 if entry.LimitBy and (entry.LimitBy.lower() == "balance") : 87 90 if balance <= 0 : 88 91 datelimit = "DENY" -
pykota/trunk/pykota/storage.py
r1043 r1062 21 21 # 22 22 # $Log$ 23 # Revision 1.17 2003/07/05 07:46:50 jalet 24 # The previous bug fix was incomplete. 25 # 23 26 # Revision 1.16 2003/06/25 19:52:31 jalet 24 27 # Should be ready for testing :-) … … 124 127 def setLimitBy(self, limitby) : 125 128 """Sets the user's limiting factor.""" 126 limitby = limitby.lower() 129 try : 130 limitby = limitby.lower() 131 except AttributeError : 132 limitby = "quota" 127 133 if limitby in ["quota", "balance"] : 128 134 self.parent.writeUserLimitBy(self, limitby) … … 151 157 def setLimitBy(self, limitby) : 152 158 """Sets the user's limiting factor.""" 153 limitby = limitby.lower() 159 try : 160 limitby = limitby.lower() 161 except AttributeError : 162 limitby = "quota" 154 163 if limitby in ["quota", "balance"] : 155 164 self.parent.writeGroupLimitBy(self, limitby) -
pykota/trunk/pykota/storages/ldapstorage.py
r1051 r1062 21 21 # 22 22 # $Log$ 23 # Revision 1.13 2003/07/05 07:46:50 jalet 24 # The previous bug fix was incomplete. 25 # 23 26 # Revision 1.12 2003/06/30 13:54:21 jalet 24 27 # Sorts by user / group name … … 188 191 fields = result[0][1] 189 192 user.ident = result[0][0] 190 user.LimitBy = fields.get("pykotaLimitBy")[0] 193 user.LimitBy = fields.get("pykotaLimitBy") 194 if user.LimitBy is not None : 195 user.LimitBy = user.LimitBy[0] 191 196 result = self.doSearch("(&(objectClass=pykotaAccountBalance)(|(pykotaUserName=%s)(%s=%s)))" % (username, self.info["balancerdn"], username), ["pykotaBalance", "pykotaLifeTimePaid"], base=self.info["balancebase"]) 192 197 if result : … … 217 222 fields = result[0][1] 218 223 group.ident = result[0][0] 219 group.LimitBy = fields.get("pykotaLimitBy")[0] 224 group.LimitBy = fields.get("pykotaLimitBy") 225 if group.LimitBy is not None : 226 group.LimitBy = group.LimitBy[0] 220 227 group.AccountBalance = 0.0 221 228 group.LifeTimePaid = 0.0 -
pykota/trunk/pykota/version.py
r1061 r1062 21 21 # 22 22 23 __version__ = "1.12alpha 1_unofficial"23 __version__ = "1.12alpha2_unofficial" 24 24 25 25 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""