IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 12, 2017, 1:15:00 PM (9 years ago)
Author:
eugene
Message:

more complete error messages in case of missing fits files

File:
1 edited

Legend:

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

    r40208 r40279  
    511511            files = glob.glob(pathBase + ".cmf")
    512512
     513        if len(files) < 1:
     514            self.logger.errorPair("No files found for forced warp path", pathBase)
     515            return None
    513516       
    514         if len(files) < 1: return None
    515517        fits = Fits(self.logger, self.config, files[0])
    516518        self.logger.infoPair("cmf file",files[0])
     
    770772               WHERE camRun.cam_id = %d" % camID \
    771773               + " AND warpRun.state != 'drop'"
     774
    772775        try:
    773776            rs = self.executeQuery(sql)
     
    854857        files = []
    855858
    856 
    857859        #there are a couple of states for smfversion
    858860
     
    865867        #    use (file).smf if camRun.state = 'full' and if there is only a .smf
    866868        #    fault out if camRun.state != 'full' -- that is a race condition we don't want.
    867        
    868869       
    869870        if (smfversion == "not_reproc") or (smfversion == "use_new"):
     
    940941
    941942        self.logger.infoPair("smf files:", files)
    942         if len(files) < 1: return None
     943        if len(files) < 1:
     944            self.logger.errorPair("No files found for cam path", path)
     945            return None
    943946
    944947        return Fits(self.logger, self.config, files[0]) # TODO just returning first file - check
     
    10101013
    10111014        # print "stack cmf files:", files
    1012         if len(files) < 1: return None
     1015        if len(files) < 1:
     1016            self.logger.errorPair("No files found for stack path", pathBase)
     1017            return None
    10131018
    10141019        # if we get here, then the cmf is readable, now check the stack_id
Note: See TracChangeset for help on using the changeset viewer.