Project

General

Profile

« Previous | Next » 

Revision 510

bin/map: Started adding support for multiple map_paths, all run in the same db transaction

View differences:

map
27 27
    env_names = []
28 28
    def usage_err():
29 29
        raise SystemExit('Usage: '+opts.env_usage(env_names, True)+' [commit=1]'
30
            ' [test=1] '+sys.argv[0]+' [map_path] [<input] [>output]')
30
            ' [test=1] '+sys.argv[0]+' [map_path...] [<input] [>output]')
31 31
    limit = opts.get_env_var('n', None, env_names)
32 32
    if limit != None: limit = int(limit)
33 33
    test = opts.env_flag('test')
......
43 43
    out_is_db = 'engine' in out_db_config
44 44
    
45 45
    # Parse args
46
    # Parse args
47
    map_paths = sys.argv[1:]
48
    if map_paths == [] and (in_is_db or not out_is_db): usage_err()
46 49
    map_path = None
47
    try: _prog_name, map_path = sys.argv
48
    except ValueError:
49
        if in_is_db or not out_is_db: usage_err()
50
    if map_paths != []: map_path = map_paths[0]
50 51
    
51 52
    # Load map header
52 53
    in_is_xpaths = True

Also available in: Unified diff