Project

General

Profile

« Previous | Next » 

Revision 54

map: Using SystemExit for usage errors to avoid stack trace

View differences:

map
38 38
    prog_name = sys.argv[0]
39 39
    try: prog_name, map_path = sys.argv
40 40
    except ValueError:
41
        if uses_map: raise Exception('Usage: env'+''.join(map(lambda name:
41
        if uses_map: raise SystemExit('Usage: env'+''.join(map(lambda name:
42 42
            ' ['+name+'=...]', env_names))+' [commit=1] '+prog_name
43 43
            +' [map_path] [<input] [>output]')
44 44
    commit = env_flag('commit')

Also available in: Unified diff