Project

General

Profile

« Previous | Next » 

Revision 1283

join: Don't raise "No join mapping" error for empty mappings because you only want the error for empty mappings for your particular dataset, which requires more information (namely, the subset of the mappings used by your dataset, some of which will not be in the mappings if standard fields have been subtracted out)

View differences:

join
35 35
    writer.writerow(maps.merge_mappings(map_0_cols, map_1_cols))
36 36
    for row in reader:
37 37
        if row[1] != '':
38
            out_orig = row[1] # used in "No join mapping" error msg
39
            
38 40
            # Look for a match
39 41
            out_row = None
40 42
            suffix = ''
......
56 58
                row = maps.merge_mappings(row, out_row)
57 59
                row[1] += suffix # don't modify out_row!
58 60
            else:
59
                msg = 'No join mapping for '+row[1]
61
                msg = 'No join mapping for '+out_orig
60 62
                warnings.warn(UserWarning(msg))
61 63
                row[2] = '** '+msg+' ** '+util.list_setdefault(row, 2, '')
62 64
                row[1] = ''

Also available in: Unified diff