IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 17, 2013, 3:37:35 PM (13 years ago)
Author:
eugene
Message:

re-work config info for scratch db to load host-based names

File:
1 edited

Legend:

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

    r35175 r35177  
    4343
    4444        # connect to scratch database
    45         scratchDbs = ['1', '2', '3']
    46         for dbVersion in scratchDbs:
    47             self.scratchDb = ScratchDb(self.logger, self.config, dbVersion)
    48             if not self.config.test and self.scratchDb.anyOtherConnections():
    49                 self.logger.errorPair("This scratch Db is already in use", self.scratchDb.dbName)
    50                 self.scratchDb.disconnect()
    51                 continue
    52             break
    53 
    54         if not self.scratchDb.connected:
     45        self.scratchDb = ScratchDb(self.logger, self.config)
     46        if not self.config.test and self.scratchDb.anyOtherConnections():
     47            self.logger.errorPair("This scratch Db is already in use", self.scratchDb.dbName)
     48            self.scratchDb.disconnect()
    5549            self.exitProgram("Cannot connect to a scratch database")
    5650            raise
Note: See TracChangeset for help on using the changeset viewer.