Changeset 4870 for waeup/trunk/src
- Timestamp:
- 21 Jan 2010, 14:56:35 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/trunk/src/waeup/utils/batching.py
r4858 r4870 5 5 """ 6 6 import grok 7 import copy 7 8 import csv 8 9 import os … … 232 233 num += 1 233 234 string_row = self.applyMapping(raw_row, mapping) 234 row, conv_warnings = self.convertToTypes(string_row, converters) 235 row, conv_warnings = self.convertToTypes( 236 copy.deepcopy(string_row), converters) 235 237 if len(conv_warnings): 236 238 warnings[num] = ', '.join(conv_warnings) 237 failed_writer.writerow( row)239 failed_writer.writerow(string_row) 238 240 continue 239 241 … … 241 243 if not self.parentsExist(row, site): 242 244 warnings[num] = "Not all parents do exist yet. Skipping" 243 failed_writer.writerow( row)245 failed_writer.writerow(string_row) 244 246 continue 245 247 if self.entryExists(row, site): 246 248 warnings[num] = 'This object already exists. Skipping.' 247 failed_writer.writerow( row)249 failed_writer.writerow(string_row) 248 250 continue 249 251 obj = self.callFactory() … … 254 256 if not self.entryExists(row, site): 255 257 warnings[num] = "Cannot remove: no such entry." 256 failed_writer.writerow( row)258 failed_writer.writerow(string_row) 257 259 continue 258 260 self.delEntry(row, site) … … 261 263 if obj is None: 262 264 warnings[num] = "Cannot update: no such entry." 263 failed_writer.writerow( row)265 failed_writer.writerow(string_row) 264 266 continue 265 267 self.updateEntry(obj, row, site)
Note: See TracChangeset for help on using the changeset viewer.