提交 44bbeea8 编写于 作者: S Steven Li

Display server and config info at connect time for crash_gen tool

上级 412abce6
...@@ -763,10 +763,16 @@ class DbConnNative(DbConn): ...@@ -763,10 +763,16 @@ class DbConnNative(DbConn):
break break
return buildPath return buildPath
connInfoDisplayed = False
def openByType(self): # Open connection def openByType(self): # Open connection
cfgPath = self.getBuildPath() + "/test/cfg" cfgPath = self.getBuildPath() + "/test/cfg"
hostAddr = "127.0.0.1"
if not self.connInfoDisplayed:
logger.info("Initiating TAOS native connection to {}, using config at {}".format(hostAddr, cfgPath))
self.connInfoDisplayed = True
self._conn = taos.connect( self._conn = taos.connect(
host="127.0.0.1", host=hostAddr,
config=cfgPath) # TODO: make configurable config=cfgPath) # TODO: make configurable
self._cursor = self._conn.cursor() self._cursor = self._conn.cursor()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册