IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35089


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

create output data dumpdir if needed

Location:
branches/eam_branches/ipp-20121219/ippToPsps/jython
Files:
2 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:
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/stackbatch.py

    r35076 r35089  
    768768        self.logger.infoPair("obtained","imageID")
    769769
    770         dumpFile = "/tmp/datadump/genetest.xx.dat"
     770        # check for & create output directory first
     771        datadumpDir = "/tmp/datadump"
     772        try:
     773            statinfo = os.stat(datadumpDir)
     774            # check on the stat results?
     775        except:
     776            print "making the data dump directory ", datadumpDir
     777            os.mkdir(datadumpDir)
     778            os.chmod(datadumpDir, 0777)
     779            statinfo = os.stat(datadumpDir)
     780
     781        dumpFile = datadumpDir + "/genetest.xx.dat"
    771782        files = glob.glob(dumpFile)
    772783        if len(files) > 0:
Note: See TracChangeset for help on using the changeset viewer.