Changeset 12810 for main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py
- Timestamp:
- 23 Mar 2015, 10:40:18 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py
r12516 r12810 273 273 return errs, inv_errs, conv_dict 274 274 275 276 def emptyRow(self, row): 277 """Detect empty rows. 278 """ 279 for value in row.values(): 280 if value: 281 return False 282 return True 283 275 284 def doImport(self, path, headerfields, mode='create', user='Unknown', 276 285 logger=None, ignore_empty=True): … … 307 316 for raw_row in reader: 308 317 num += 1 318 # Skip row if empty 319 if self.emptyRow(raw_row): 320 continue 309 321 string_row = self.applyMapping(raw_row, mapping) 310 322 if ignore_empty and mode in ('update',): 311 # replace empty strings with ignore-markers323 # Replace empty strings with ignore-markers 312 324 for key, val in string_row.items(): 313 325 if val == '':
Note: See TracChangeset for help on using the changeset viewer.