# HG changeset patch # User Sylvain Thénault # Date 1337001847 -7200 # Node ID f3bc8ca0b715f1d8cc224ad44fb0f163bc6e2672 # Parent e83725261adf58abeb492f7bdd72d845ef4edae2 [data import] don't crash if value isn't in the file, simply no key/value in the output dict. Closes #2356328 diff -r e83725261adf -r f3bc8ca0b715 dataimport.py --- a/dataimport.py Tue May 15 14:43:08 2012 +0200 +++ b/dataimport.py Mon May 14 15:24:07 2012 +0200 @@ -182,7 +182,10 @@ assert isinstance(row, dict) assert isinstance(map, list) for src, dest, funcs in map: - res[dest] = row[src] + try: + res[dest] = row[src] + except KeyError: + continue try: for func in funcs: res[dest] = func(res[dest])