Changeset 2454 for pykota/trunk
- Timestamp:
- 09/17/05 22:11:53 (19 years ago)
- Location:
- pykota/trunk
- Files:
-
- 16 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r2452 r2454 139 139 140 140 -H | --hardlimit hl Sets the quota hard limit to hl pages. 141 142 -I | --increase v Increase both Soft and Hard limits by the value 143 of v. You can prefix v with + or -, if no sign is 144 used, + is assumed. 141 145 142 146 -U | --used usage Sets the pagecounters for the user to usage pages; … … 270 274 except ValueError : 271 275 raise PyKotaToolError, _("Invalid used value %s.") % used 276 277 increase = options["increase"] 278 if increase : 279 try : 280 increase = int(increase.strip()) 281 except ValueError : 282 raise PyKotaToolError, _("Invalid increase value %s.") % increase 272 283 273 284 if not options["noquota"] : … … 275 286 try : 276 287 softlimit = int(options["softlimit"].strip()) 288 if softlimit < 0 : 289 raise ValueError 277 290 except ValueError : 278 291 raise PyKotaToolError, _("Invalid softlimit value %s.") % options["softlimit"] … … 280 293 try : 281 294 hardlimit = int(options["hardlimit"].strip()) 295 if hardlimit < 0 : 296 raise ValueError 282 297 except ValueError : 283 298 raise PyKotaToolError, _("Invalid hardlimit value %s.") % options["hardlimit"] … … 466 481 self.printInfo(_("Quota not found for object %s on printer %s.") % (entry.Name, printer.Name)) 467 482 else : 468 if options["noquota"] or options["prototype"] or ((softlimit is not None) and (hardlimit is not None)) : 483 if options["noquota"] or options["prototype"] \ 484 or ((softlimit is not None) and (hardlimit is not None)) : 469 485 entrypquota.setLimits(softlimit, hardlimit) 486 if increase : 487 if (entrypquota.SoftLimit is None) \ 488 or (entrypquota.HardLimit is None) : 489 self.printInfo(_("You can't increase limits by %s when no limit is set.") % increase, "error") 490 else : 491 newsoft = entrypquota.SoftLimit + increase 492 newhard = entrypquota.HardLimit + increase 493 if (newsoft >= 0) and (newhard >= 0) : 494 entrypquota.setLimits(newsoft, newhard) 495 else : 496 self.printInfo(_("You can't set negative limits."), "error") 470 497 if limitby : 471 498 if changed[entry.Name].get("limitby") is None : … … 527 554 "comment" : "", \ 528 555 } 529 short_options = "vhdo:c:C:l:b:i:naugrp:P:S:H:G:RU: "556 short_options = "vhdo:c:C:l:b:i:naugrp:P:S:H:G:RU:I:" 530 557 long_options = ["help", "version", "comment=", \ 531 558 "overcharge=", "charge=", "delete", "limitby=", \ … … 533 560 "groups", "reset", "hardreset", "prototype=", \ 534 561 "printer=", "softlimit=", "hardlimit=", "pgroups=", \ 535 " used="]562 "increase=", "used="] 536 563 537 564 # Initializes the command line tool … … 564 591 options["overcharge"] = options["o"] or options["overcharge"] 565 592 options["comment"] = options["C"] or options["comment"] or defaults["comment"] 593 options["increase"] = options["I"] or options["increase"] 566 594 567 595 if options["help"] : -
pykota/trunk/man/de/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/el_GR/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/es/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/fr/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/it/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/nb_NO/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/pt_BR/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/pt/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/sv_SE/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/th/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/tr/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/man/zh_TW/edpykota.1
r2453 r2454 131 131 Sets the quota hard limit to hl pages. 132 132 .TP 133 \fB\-I\fR | \fB\-\-increase\fR v 134 Increase both Soft and Hard limits by the value 135 of v. You can prefix v with + or \-, if no sign is 136 used, + is assumed. 137 .TP 133 138 \fB\-U\fR | \fB\-\-used\fR usage 134 139 Sets the pagecounters for the user to usage pages; -
pykota/trunk/NEWS
r2452 r2454 40 40 group or groups (separated with commas). 41 41 42 - The -I | --increase command line switch to edpykota allows 43 to increase or decrease page limits. 44 42 45 - 1.23alpha29 : 43 46 -
pykota/trunk/TODO
r2452 r2454 49 49 better integrate PyKota with these. 50 50 51 - Allow soft and hard limits to be increased/decreased.52 53 51 - Add most configuration directives to the database itself, 54 52 while still allowing to overwrite them with the configuration