Changeset 4889 for waeup


Ignore:
Timestamp:
25 Jan 2010, 07:08:58 (15 years ago)
Author:
uli
Message:

Name pending files ending with .csv.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • waeup/trunk/src/waeup/utils/batching.py

    r4885 r4889  
    233233        converters = self.getFieldConverters(headerfields)
    234234        reader = csv.DictReader(open(path, 'rb'))
    235        
    236         failed_path = "%s.%s.pending" % (path, mode, )
     235
     236        (base, ext) = os.path.splitext(path)
     237        failed_path = "%s.%s.pending%s" % (base, mode, ext)
    237238        failed_headers = [x for x in mapping.values()]
    238         # if x != '--IGNORE--']
    239239        failed_headers.append('--ERRORS--')
    240240        failed_writer = csv.DictWriter(open(failed_path, 'wb'),
Note: See TracChangeset for help on using the changeset viewer.