Changeset 769 for pykota/trunk/bin
- Timestamp:
- 02/08/03 23:47:23 (22 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r768 r769 17 17 # 18 18 # $Log$ 19 # Revision 1.17 2003/02/08 22:47:23 jalet 20 # Option --reset can now be used without having to use soft and hard limits 21 # on the command line. 22 # 19 23 # Revision 1.16 2003/02/08 22:39:46 jalet 20 24 # --reset command line option added … … 135 139 This will set print quota soft limit to 500 pages and hard limit 136 140 to 550 pages for groups financial and support on all printers. 141 142 $ edpykota --reset jerome 143 144 This will reset jerome's page counter to zero on all printers. 145 His life time page counter on each printer will be kept unchanged. 137 146 138 147 This program is free software; you can redistribute it and/or modify … … 199 208 softlimit = hardlimit 200 209 self.logger.log_message("Undefined soft limit set to hard limit (%s) on printer %s." % (str(softlimit), printer)) 201 if ( hardlimit is None) or (softlimit is None) :210 if (not options["reset"]) and ((hardlimit is None) or (softlimit is None)) : 202 211 raise PyKotaToolError, "Both hard and soft limits must be set ! Aborting." 203 212 for name in names : … … 229 238 else : 230 239 if options["users"] : 231 self.storage.setUserPQuota(name, printer, softlimit, hardlimit) 240 if (softlimit is not None) and (hardlimit is not None) : 241 self.storage.setUserPQuota(name, printer, softlimit, hardlimit) 232 242 if options["reset"] : 233 243 self.storage.resetUserPQuota(name, printer) 234 244 else : 235 self.storage.setGroupPQuota(name, printer, softlimit, hardlimit) 245 if (softlimit is not None) and (hardlimit is not None) : 246 self.storage.setGroupPQuota(name, printer, softlimit, hardlimit) 236 247 if options["reset"] : 237 248 self.storage.resetGroupPQuota(name, printer)