Project

General

Profile

« Previous | Next » 

Revision 1766

join: Use new maps.join_combinable() to check if column names match

View differences:

join
30 30
    reader = csv.reader(sys.stdin)
31 31
    writer = csv.writer(sys.stdout)
32 32
    map_0_cols = reader.next()
33
    if not map_0_cols[1] == map_1_cols[0]: raise SystemExit('Map error: '
34
        'Map 0 output column name "'+map_0_cols[1]
33
    if not maps.join_combinable(map_0_cols, map_1_cols):
34
        raise SystemExit('Map error: Map 0 output column name "'+map_0_cols[1]
35 35
        +'" doesn\'t match map 1 input column name "'+map_1_cols[0]+'"')
36 36
    writer.writerow(maps.merge_mappings(map_0_cols, map_1_cols))
37 37
    for row in reader:

Also available in: Unified diff