Example #1
0
 def _getSession(self, db):
     details = self.conf.data[self.conf.getDefaultConfigSection()]
     details['db'] = db
     fmt = "Logging on to user database %(db)s [%(dbset)s] as " \
           "%(login)s/%(passwd)s..."
     self.cb.write(fmt % details)
     start = time.time()
     session = api.getSession(api.SessionClassType.User, details)
     self.cb.write("done (%.3f secs)\n" % (time.time() - start))
     return session
Example #2
0
 def _getSession(self, sessionClassType, conf):
     if sessionClassType == api.SessionClassType.User:
         fmt = "Logging on to user database %(db)s [%(dbset)s] as "
     else:
         fmt = "Logging on to schema %(dbset)s as "
     fmt += "%(login)s/%(passwd)s..."
     self.cb.write(fmt % conf)
     start = time.time()
     session = api.getSession(sessionClassType, conf)
     self.cb.write("done (%.3f secs)\n" % (time.time() - start))
     return session