Changeset 2073 for pykota/trunk
- Timestamp:
- 02/19/05 18:47:19 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r2054 r2073 24 24 # 25 25 # $Log$ 26 # Revision 1.88 2005/02/19 17:47:19 jalet 27 # Fixed the --prototype command line option to edpykota 28 # 26 29 # Revision 1.87 2005/02/13 22:02:28 jalet 27 30 # Big database structure changes. Upgrade script is now included as well as … … 600 603 groupnames = [] 601 604 602 if options["prototype"] :603 protoentry = getattr(self.storage, "get%s" % suffix)(options["prototype"])604 605 605 rejectunknown = self.config.getRejectUnknown() 606 606 printeradded = 0 … … 634 634 printersgroups = self.storage.getMatchingPrinters(options["pgroups"]) 635 635 636 if options["prototype"] : 637 protoentry = getattr(self.storage, "get%s" % suffix)(options["prototype"]) 638 if not protoentry.Exists : 639 raise PyKotaToolError, _("Prototype object %s not found in Quota Storage.") % protoentry.Name 640 else : 641 limitby = protoentry.LimitBy 642 balancevalue = protoentry.AccountBalance 643 balance = str(balance) 644 overcharge = getattr(protoentry, "OverCharge", None) 645 636 646 todelete = {} 637 647 changed = {} # tracks changes made at the user/group level … … 645 655 646 656 if options["prototype"] : 647 if protoentry.Exists : 648 protoquota = getattr(self.storage, "get%sPQuota" % suffix)(protoentry, printer) 649 if not protoquota.Exists : 650 self.printInfo(_("Prototype %s not found in Quota Storage for printer %s.") % (protoentry.Name, printer.Name)) 651 continue # skip this printer 652 else : 653 (softlimit, hardlimit) = (protoquota.SoftLimit, protoquota.HardLimit) 654 else : 655 self.printInfo(_("Prototype object %s not found in Quota Storage.") % protoentry.Name) 657 protoquota = getattr(self.storage, "get%sPQuota" % suffix)(protoentry, printer) 658 if not protoquota.Exists : 659 self.printInfo(_("Prototype %s not found in Quota Storage for printer %s.") % (protoentry.Name, printer.Name)) 660 else : 661 (softlimit, hardlimit) = (protoquota.SoftLimit, protoquota.HardLimit) 656 662 657 663 if not options["noquota"] : … … 745 751 746 752 if not options["groups"] : 747 if options["used"]:753 if used : 748 754 entrypquota.setUsage(used) 749 755 … … 824 830 elif (options["add"] or options["prototype"]) and options["delete"] : 825 831 raise PyKotaToolError, _("incompatible options, see help.") 826 elif (options[" softlimit"] or options["hardlimit"]) and options["prototype"] :832 elif (options["reset"] or options["hardreset"] or options["limitby"] or options["used"] or options["balance"] or options["overcharge"] or options["softlimit"] or options["hardlimit"]) and options["prototype"] : 827 833 raise PyKotaToolError, _("incompatible options, see help.") 828 834 elif options["noquota"] and (options["prototype"] or options["hardlimit"] or options["softlimit"]) : -
pykota/trunk/NEWS
r2066 r2073 22 22 PyKota NEWS : 23 23 24 - 1.21alpha27 : 25 26 - epykota's --prototype option now works fine with accounts 27 limited by balance. 28 24 29 - 1.21alpha26 : 25 30 -
pykota/trunk/pykota/version.py
r2066 r2073 22 22 # 23 23 24 __version__ = "1.21alpha2 6_unofficial"24 __version__ = "1.21alpha27_unofficial" 25 25 26 26 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng.""" -
pykota/trunk/TODO
r2072 r2073 30 30 31 31 - Allow soft and hard limits to be increased/decreased. 32 33 - Better --prototype option in edpykota34 32 35 33 - Web enabled pykotme.