IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33495 for trunk/ippToPsps


Ignore:
Timestamp:
Mar 13, 2012, 10:09:35 AM (14 years ago)
Author:
rhenders
Message:

purged resetDetections() method; now checking we are connected to correct scratch Db before re-connecting

File:
1 edited

Legend:

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

    r33356 r33495  
    5151
    5252    '''
    53     Sets to scratch database
     53    Connects to the scratch database with the provided name, if not already connected
    5454    '''
    5555    def setScratchDb(self, dbName):
     56
     57        # if we're already connected to this database, then get out of here
     58        try:
     59            if self.scratchDb.dbName == dbName: return
     60        except: pass
    5661
    5762        self.scratchDb = ScratchDb(self.logger, self.config, dbName)
    5863        self.scratchDb.setUseFullTables(True)
    5964
    60         # or decide if we are using the right DVO
     65        # decide if we are using the right DVO
    6166        self.correctDvo = self.scratchDb.isCorrectDvo(self.config.dvoLocation)
    62  
     67
    6368        if not self.correctDvo:
    6469            print "*******************************************************************************"
     
    8388
    8489    '''
    85     Resets all detections. Be careful
    86     '''
    87     def resetDetections(self):
    88 
    89         self.logger.infoPair("Resetting", "just detections")
    90         self.scratchDb.resetDvoDetectionTables()
    91 
    92     '''
    9390    Resets all dvo tables. Be very careful....
    9491    '''
     
    9693
    9794        self.logger.infoPair("Resetting", "all tables")
    98         self.scratchDb.resetAllDvoTables()
     95        if not self.scratchDb.resetAllDvoTables(): return False
    9996        self.correctDvo = True
    10097
Note: See TracChangeset for help on using the changeset viewer.