IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2013, 11:11:22 AM (13 years ago)
Author:
eugene
Message:

create output data dumpdir if needed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/detectionbatch.py

    r35080 r35089  
    586586        self.logger.infoPair("obtained","imageID")
    587587
    588         dumpFile = "/tmp/datadump/genetest.xx.dat"
     588        # check for & create output directory first
     589        datadumpDir = "/tmp/datadump"
     590        try:
     591            statinfo = os.stat(datadumpDir)
     592            # check on the stat results?
     593        except:
     594            print "making the data dump directory ", datadumpDir
     595            os.mkdir(datadumpDir)
     596            os.chmod(datadumpDir, 0777)
     597            statinfo = os.stat(datadumpDir)
     598
     599        dumpFile = datadumpDir + "/genetest.xx.dat"
    589600        files = glob.glob(dumpFile)
    590601        if len(files) > 0:
Note: See TracChangeset for help on using the changeset viewer.