IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 14, 2012, 12:02:48 PM (14 years ago)
Author:
rhenders
Message:

Big changes to support a new Config class that encapuslates the xml config file

File:
1 edited

Legend:

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

    r33181 r33259  
    2121
    2222    '''
    23     def __init__(self, logger, doc, dbType):
     23    def __init__(self, logger, config, dbType):
    2424
    2525        # set up logging
    2626        self.logger = logger
    27         self.doc = doc
     27        self.config = config
    2828        self.logger.debug("MySql class constructor")
    2929
    3030        # open config and grab database parameters
    31         self.dbName = self.doc.find(dbType +"/name").text
    32         self.dbHost = self.doc.find(dbType +"/host").text
    33         self.dbUser = self.doc.find(dbType +"/user").text
    34         self.dbPass = self.doc.find(dbType +"/password").text
     31        self.dbName = config.getDbName(dbType)
     32        self.dbHost = config.getDbHost(dbType)
     33        self.dbUser = config.getDbUser(dbType)
     34        self.dbPass = config.getDbPassword(dbType)
    3535
    3636        # set up JDBC connection
     
    8080        connectionID = self.getLastConnectionID()
    8181        if connectionID == self.connectionID:
    82             self.logger.error("NOT going to kill THIS connection ID")
     82            self.logger.debug("NOT going to kill THIS connection ID")
    8383            return
    8484
Note: See TracChangeset for help on using the changeset viewer.