- Timestamp:
- 04/15/03 15:06:39 (22 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/edpykota
r907 r916 23 23 # 24 24 # $Log$ 25 # Revision 1.35 2003/04/15 13:06:39 jalet 26 # Allow to add a printer without any user 27 # 25 28 # Revision 1.34 2003/04/11 16:51:11 jalet 26 29 # Bug fix for edpykota --add with users who already had a quota on the printer. … … 238 241 def main(self, names, options) : 239 242 """Edit user or group quotas.""" 243 printeradded = 0 240 244 printers = self.storage.getMatchingPrinters(options["printer"]) 241 245 if not printers : … … 245 249 printerid = self.storage.addPrinter(pname) 246 250 printers = [ (printerid, pname) ] 251 printeradded = 1 247 252 else : 248 253 raise PyKotaToolError, _("Invalid printer name %s") % pname … … 265 270 (softlimit, hardlimit) = (hardlimit, softlimit) 266 271 if not names : 267 if options["add"] :272 if options["add"] and not printeradded : 268 273 raise PyKotaToolError, _("You have to pass user names on the command line") 269 274 else :