Changeset 1584 for pykota/trunk/bin/edpykota
- Timestamp:
- 07/01/04 21:56:43 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r1546 r1584 24 24 # 25 25 # $Log$ 26 # Revision 1.76 2004/07/01 19:56:40 jalet 27 # Better dispatching of error messages 28 # 26 29 # Revision 1.75 2004/06/18 13:34:47 jalet 27 30 # Now all tracebacks include PyKota's version number … … 463 466 if (softlimit is not None) and (hardlimit is not None) and (hardlimit < softlimit) : 464 467 # error, exchange them 465 self. logger.log_message(_("Hard limit %i is less than soft limit %i, values will be exchanged.") % (hardlimit, softlimit))468 self.printInfo(_("Hard limit %i is less than soft limit %i, values will be exchanged.") % (hardlimit, softlimit)) 466 469 (softlimit, hardlimit) = (hardlimit, softlimit) 467 470 … … 541 544 protoquota = getattr(self.storage, "get%sPQuota" % suffix)(protoentry, printer) 542 545 if not protoquota.Exists : 543 self. logger.log_message(_("Prototype %s not found in Quota Storage for printer %s.") % (protoentry.Name, printer.Name))546 self.printInfo(_("Prototype %s not found in Quota Storage for printer %s.") % (protoentry.Name, printer.Name)) 544 547 continue # skip this printer 545 548 else : 546 549 (softlimit, hardlimit) = (protoquota.SoftLimit, protoquota.HardLimit) 547 550 else : 548 self. logger.log_message(_("Prototype object %s not found in Quota Storage.") % protoentry.Name)551 self.printInfo(_("Prototype object %s not found in Quota Storage.") % protoentry.Name) 549 552 550 553 if not options["noquota"] : … … 552 555 hardlimit = softlimit 553 556 if hardlimit is not None : 554 self. logger.log_message(_("Undefined hard limit set to soft limit (%s) on printer %s.") % (str(hardlimit), printer.Name))557 self.printInfo(_("Undefined hard limit set to soft limit (%s) on printer %s.") % (str(hardlimit), printer.Name)) 555 558 if softlimit is None : 556 559 softlimit = hardlimit 557 560 if softlimit is not None : 558 self. logger.log_message(_("Undefined soft limit set to hard limit (%s) on printer %s.") % (str(softlimit), printer.Name))561 self.printInfo(_("Undefined soft limit set to hard limit (%s) on printer %s.") % (str(softlimit), printer.Name)) 559 562 560 563 if options["add"] : … … 568 571 (name, email) = splitname 569 572 if email and (email.count('@') != 1) : 570 self. logger.log_message(_("Invalid email address %s") % email)573 self.printInfo(_("Invalid email address %s") % email) 571 574 email = "" 572 575 entry = getattr(self.storage, "get%s" % suffix)(name) … … 595 598 else : 596 599 if options["groups"] : 597 self. logger.log_message(_("Invalid group name %s") % entry.Name)600 self.printInfo(_("Invalid group name %s") % entry.Name) 598 601 else : 599 self. logger.log_message(_("Invalid user name %s") % entry.Name)602 self.printInfo(_("Invalid user name %s") % entry.Name) 600 603 elif options["delete"] : 601 604 todelete[entry.Name] = entry … … 607 610 608 611 if not entrypquota.Exists : 609 self. logger.log_message(_("Quota not found for object %s on printer %s.") % (entry.Name, printer.Name))612 self.printInfo(_("Quota not found for object %s on printer %s.") % (entry.Name, printer.Name)) 610 613 else : 611 614 if options["noquota"] or options["prototype"] or ((softlimit is not None) and (hardlimit is not None)) : … … 640 643 changed[entry.Name]["ingroups"].append(groupname) 641 644 else : 642 self. logger.log_message(_("Group %s not found in the PyKota Storage.") % groupname)645 self.printInfo(_("Group %s not found in the PyKota Storage.") % groupname) 643 646 644 647 # This line disabled to prevent sending of unwanted email