Show
Ignore:
Timestamp:
09/27/05 20:34:31 (19 years ago)
Author:
jerome
Message:

Ensure that human made errors (like incorrect command line options)
don't produce a traceback anymore. No need to frighten users with
such complete tracebacks and email reporting each time they mistype
some command.
Makes pykosd check more carefully the values of its command line options.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/dumpykota

    r2344 r2512  
    2929 
    3030from pykota import version 
    31 from pykota.tool import PyKotaToolError, crashed, N_ 
     31from pykota.tool import PyKotaToolError, PyKotaCommandLineError, crashed, N_ 
    3232from pykota.dumper import DumPyKota 
    3333 
     
    154154            dumper.display_version_and_quit() 
    155155        elif options["data"] is None :     
    156             raise PyKotaToolError, _("The -d | --data command line option is mandatory, see help.") 
     156            raise PyKotaCommandLineError, _("The -d | --data command line option is mandatory, see help.") 
    157157        else : 
    158158            retcode = dumper.main(args, options) 
    159159    except KeyboardInterrupt :         
    160160        sys.stderr.write("\nInterrupted with Ctrl+C !\n") 
     161    except PyKotaCommandLineError, msg :     
     162        sys.stderr.write("%s : %s\n" % (sys.argv[0], msg)) 
    161163    except SystemExit :         
    162164        pass