Project

General

Profile

« Previous | Next » 

Revision 313

bin/map: Moved process_rows() exception handling around entire row, rather than each value, so that a broken value will not be ignored only to cause errors when outputing the row

View differences:

bin/map
84 84
            '''Processes input values
85 85
            @param get_value f(in_, row):str
86 86
            '''
87
            for i, row in enumerate(rows):
88
                if not (limit == None or i < limit): break
89
                row_id = str(i)
90
                for in_, out in mappings:
91
                    value = metadata_value(in_)
92
                    if value == None: value = get_value(in_, row)
93
                    if value != None:
94
                        try: xpath.put_obj(root, out, row_id, has_types, value)
95
                        except Exception: traceback.print_exc()
87
            try:
88
                for i, row in enumerate(rows):
89
                    if not (limit == None or i < limit): break
90
                    row_id = str(i)
91
                    for in_, out in mappings:
92
                        value = metadata_value(in_)
93
                        if value == None: value = get_value(in_, row)
94
                        if value != None:
95
                            xpath.put_obj(root, out, row_id, has_types, value)
96
            except Exception: traceback.print_exc()
96 97
        
97 98
        if map_path == None:
98 99
            iter_ = xml_dom.NodeElemIter(doc0.documentElement)

Also available in: Unified diff