Changeset 2738

Show
Ignore:
Timestamp:
02/21/06 17:18:59 (19 years ago)
Author:
jerome
Message:

Display missing users/groups early

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/edpykota

    r2737 r2738  
    178178                self.display("%s...\n" % _("Creation")) 
    179179                mentries = getattr(self.storage, "getMatching%ss" % suffix)(",".join(names)) 
    180                 if not mentries : 
    181                     raise PyKotaCommandLineError, _("Impossible to create print quota entries if the user or group object doesn't exist first. Please use pkusers to create it.") 
     180                dicnames = {} 
     181                for m in mentries : 
     182                    dicnames[m.Name] = None 
     183                for name in names : 
     184                    if not dicnames.has_key(name) : 
     185                        self.printInfo(_("Impossible to create print quota entries if the user or group object %s doesn't already exist. Please use pkusers to create it first.") % name, "warn") 
    182186                mprinters = self.storage.getMatchingPrinters(options["printer"]) 
    183187                nbtotal = len(mprinters) * len(mentries)