IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 29, 2011, 9:33:33 PM (15 years ago)
Author:
rhenders
Message:

better logging when deleting a batch from disk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/batch.py

    r32211 r32221  
    191191    '''
    192192    @staticmethod
    193     def deleteFromDisk(basePath, batchType, dvoLabel, id):
     193    def deleteFromDisk(logger, basePath, batchType, dvoLabel, id):
    194194       
    195195        tarballPath = Batch.getTarballPath(basePath, batchType, dvoLabel, id)
    196196        dirPath = Batch.getOutputPath(basePath, batchType, dvoLabel, id)
    197197
    198         if not os.path.exists(tarballPath): return 1
     198        if not os.path.exists(tarballPath):
     199            logger.errorPair("Could not find", tarballPath)
     200            return 1
    199201
    200202        try:
    201203            os.remove(tarballPath)
     204            logger.infoPair("Deleted", tarballPath)
    202205        except:
     206            logger.errorPair("Could not delete", tarballPath)
    203207            return 0
    204208   
Note: See TracChangeset for help on using the changeset viewer.