Project

General

Profile

« Previous | Next » 

Revision 1502

union: Use new maps.combinable()

View differences:

union
9 9

  
10 10
import maps
11 11
import opts
12
import strings
13 12

  
14
def col_label(col_name): return col_name.partition(':')[0]
15

  
16 13
def main():
17 14
    ignore = opts.env_flag('ignore')
18 15
    header_num = int(opts.get_env_var('header_num', 0))
......
34 31
    headers[1] = map_1_reader.next()
35 32
    
36 33
    # Check col labels
37
    combinable = strings.overlaps(*[col_label(header[0]) for header in headers])
38
    if not combinable and not ignore: raise SystemExit('Map error: '
34
    if not maps.combinable(*headers) and not ignore:
35
        raise SystemExit('Map error: '
39 36
        'Map 0 column 0 label doesn\'t contain map 1 column 0 label')
40 37
    
41 38
    # Pass through map 0, storing which inputs it defines

Also available in: Unified diff