Changeset 2512 for pykota/trunk/bin/warnpykota
- Timestamp:
- 09/27/05 20:34:31 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/warnpykota
r2344 r2512 29 29 import pwd 30 30 31 from pykota.tool import PyKotaTool, PyKotaToolError, crashed, N_31 from pykota.tool import PyKotaTool, PyKotaToolError, PyKotaCommandLineError, crashed, N_ 32 32 from pykota.config import PyKotaConfigError 33 33 from pykota.storage import PyKotaStorageError … … 108 108 printers = self.storage.getMatchingPrinters(options["printer"]) 109 109 if not printers : 110 raise PyKota ToolError, _("There's no printer matching %s") % options["printer"]110 raise PyKotaCommandLineError, _("There's no printer matching %s") % options["printer"] 111 111 alreadydone = {} 112 112 for printer in printers : … … 155 155 sender.display_version_and_quit() 156 156 elif options["users"] and options["groups"] : 157 raise PyKota ToolError, _("incompatible options, see help.")157 raise PyKotaCommandLineError, _("incompatible options, see help.") 158 158 else : 159 159 retcode = sender.main(args, options) 160 160 except KeyboardInterrupt : 161 161 sys.stderr.write("\nInterrupted with Ctrl+C !\n") 162 except PyKotaCommandLineError, msg : 163 sys.stderr.write("%s : %s\n" % (sys.argv[0], msg)) 162 164 except SystemExit : 163 165 pass