Changeset 4894


Ignore:
Timestamp:
27 Jan 2010, 11:29:30 (15 years ago)
Author:
uli
Message:

Return the set paths of created files after processing.

File:
1 edited

Legend:

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

    r4891 r4894  
    235235
    236236        (base, ext) = os.path.splitext(path)
    237         failed_path = "%s.%s.pending%s" % (base, mode, ext)
     237        failed_path = "%s.pending%s" % (base, ext)
    238238        failed_headers = [x for x in mapping.values()]
    239239        failed_headers.append('--ERRORS--')
     
    242242        failed_writer.writerow(dict([(x,x) for x in failed_headers]))
    243243
    244         finished_path = "%s.%s.finished%s" % (base, mode, ext)
     244        finished_path = "%s.finished%s" % (base, ext)
    245245        finished_headers = [x for x in mapping.values()]
    246246        finished_writer = csv.DictWriter(open(finished_path, 'wb'),
     
    306306        self.createLogfile(path, failed_path, num, num_warns, mode, user,
    307307                           timedelta, logger=logger)
     308        failed_path = os.path.abspath(failed_path)
    308309        if num_warns == 0:
    309310            del failed_writer
    310311            os.unlink(failed_path)
    311         return (num, num_warns)
     312            failed_path = None
     313        return (num, num_warns,
     314                os.path.abspath(finished_path), failed_path)
    312315
    313316class FacultyProcessor(BatchProcessor):
Note: See TracChangeset for help on using the changeset viewer.