Project

General

Profile

« Previous | Next » 

Revision 5720

xml_func.py: process(): Pass on_error through to sql_io.put(). This fixes a bug in row-based import where DB errors in the xml_func.process() phase would abort the entire import instead of being tracked and having the return value set to None.

View differences:

lib/xml_func.py
150 150
    elif row_mode and (is_rel_func(name) or func == None): # row-based mode
151 151
        if reduce(operator.or_, (xml_dom.is_node(v) for n, v in items)):
152 152
            return # preserve complex funcs
153
        try: value = sql_io.put(db, name, dict(items)) # evaluate using DB
153
        # Evaluate using DB
154
        try: value = sql_io.put(db, name, dict(items), on_error=on_error)
154 155
        except sql.DoesNotExistException: return # preserve unknown funcs
155 156
            # possibly a built-in function of db_xml.put()
156 157
    elif column_mode or func == None:

Also available in: Unified diff