Changeset 4891
- Timestamp:
- 25 Jan 2010, 08:31:22 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/trunk/src/waeup/utils/batching.py
r4889 r4891 241 241 failed_headers) 242 242 failed_writer.writerow(dict([(x,x) for x in failed_headers])) 243 244 finished_path = "%s.%s.finished%s" % (base, mode, ext) 245 finished_headers = [x for x in mapping.values()] 246 finished_writer = csv.DictWriter(open(finished_path, 'wb'), 247 finished_headers) 248 finished_writer.writerow(dict([(x,x) for x in finished_headers])) 243 249 244 250 num =0 … … 289 295 continue 290 296 self.updateEntry(obj, row, site) 297 finished_writer.writerow(string_row) 291 298 292 299 time_end = time.time() 293 300 timedelta = time_end - time_start 294 301 295 if path.endswith('.pending '):302 if path.endswith('.pending.csv'): 296 303 os.unlink(path) 297 304 os.rename(failed_path, path)
Note: See TracChangeset for help on using the changeset viewer.