Index: pykota/trunk/bin/edpykota
===================================================================
--- pykota/trunk/bin/edpykota (revision 1546)
+++ pykota/trunk/bin/edpykota (revision 1584)
@@ -24,4 +24,7 @@
 #
 # $Log$
+# Revision 1.76  2004/07/01 19:56:40  jalet
+# Better dispatching of error messages
+#
 # Revision 1.75  2004/06/18 13:34:47  jalet
 # Now all tracebacks include PyKota's version number
@@ -463,5 +466,5 @@
             if (softlimit is not None) and (hardlimit is not None) and (hardlimit < softlimit) :        
                 # error, exchange them
-                self.logger.log_message(_("Hard limit %i is less than soft limit %i, values will be exchanged.") % (hardlimit, softlimit))
+                self.printInfo(_("Hard limit %i is less than soft limit %i, values will be exchanged.") % (hardlimit, softlimit))
                 (softlimit, hardlimit) = (hardlimit, softlimit)
             
@@ -541,10 +544,10 @@
                     protoquota = getattr(self.storage, "get%sPQuota" % suffix)(protoentry, printer)
                     if not protoquota.Exists :
-                        self.logger.log_message(_("Prototype %s not found in Quota Storage for printer %s.") % (protoentry.Name, printer.Name))
+                        self.printInfo(_("Prototype %s not found in Quota Storage for printer %s.") % (protoentry.Name, printer.Name))
                         continue    # skip this printer
                     else :    
                         (softlimit, hardlimit) = (protoquota.SoftLimit, protoquota.HardLimit)
                 else :        
-                    self.logger.log_message(_("Prototype object %s not found in Quota Storage.") % protoentry.Name)
+                    self.printInfo(_("Prototype object %s not found in Quota Storage.") % protoentry.Name)
                     
             if not options["noquota"] :    
@@ -552,9 +555,9 @@
                     hardlimit = softlimit
                     if hardlimit is not None :
-                        self.logger.log_message(_("Undefined hard limit set to soft limit (%s) on printer %s.") % (str(hardlimit), printer.Name))
+                        self.printInfo(_("Undefined hard limit set to soft limit (%s) on printer %s.") % (str(hardlimit), printer.Name))
                 if softlimit is None :    
                     softlimit = hardlimit
                     if softlimit is not None :
-                        self.logger.log_message(_("Undefined soft limit set to hard limit (%s) on printer %s.") % (str(softlimit), printer.Name))
+                        self.printInfo(_("Undefined soft limit set to hard limit (%s) on printer %s.") % (str(softlimit), printer.Name))
                         
             if options["add"] :    
@@ -568,5 +571,5 @@
                         (name, email) = splitname
                         if email and (email.count('@') != 1) :
-                            self.logger.log_message(_("Invalid email address %s") % email)
+                            self.printInfo(_("Invalid email address %s") % email)
                             email = ""
                     entry = getattr(self.storage, "get%s" % suffix)(name)
@@ -595,7 +598,7 @@
                         else :    
                             if options["groups"] :
-                                self.logger.log_message(_("Invalid group name %s") % entry.Name)
+                                self.printInfo(_("Invalid group name %s") % entry.Name)
                             else :    
-                                self.logger.log_message(_("Invalid user name %s") % entry.Name)
+                                self.printInfo(_("Invalid user name %s") % entry.Name)
                 elif options["delete"] :                
                     todelete[entry.Name] = entry
@@ -607,5 +610,5 @@
                         
                 if not entrypquota.Exists :     
-                    self.logger.log_message(_("Quota not found for object %s on printer %s.") % (entry.Name, printer.Name))
+                    self.printInfo(_("Quota not found for object %s on printer %s.") % (entry.Name, printer.Name))
                 else :    
                     if options["noquota"] or options["prototype"] or ((softlimit is not None) and (hardlimit is not None)) :
@@ -640,5 +643,5 @@
                                     changed[entry.Name]["ingroups"].append(groupname)
                                 else :
-                                    self.logger.log_message(_("Group %s not found in the PyKota Storage.") % groupname)
+                                    self.printInfo(_("Group %s not found in the PyKota Storage.") % groupname)
                                     
                     # This line disabled to prevent sending of unwanted email                 
