提交 0964bc38 编写于 作者: S Steven Li

Added warning message upon REST API failure for crash_gen tool

上级 c4ca6c02
......@@ -561,9 +561,13 @@ class DbConnRest(DbConn):
self.isOpen = False
def _doSql(self, sql):
try:
r = requests.post(self._url,
data = sql,
auth = HTTPBasicAuth('root', 'taosdata'))
except:
print("REST API Failure (TODO: more info here)")
raise
rj = r.json()
# Sanity check for the "Json Result"
if (not 'status' in rj):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册