提交 f0364a00 编写于 作者: H Hongze Cheng

fix python close connection error

上级 8b226b5b
......@@ -243,8 +243,8 @@ class CTaosInterface(object):
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
except AttributeError:
raise AttributeError("sql is expected as a string")
finally:
CTaosInterface.libtaos.close(connection)
# finally:
# CTaosInterface.libtaos.close(connection)
@staticmethod
def affectedRows(connection):
......
......@@ -243,8 +243,8 @@ class CTaosInterface(object):
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
except AttributeError:
raise AttributeError("sql is expected as a string")
finally:
CTaosInterface.libtaos.close(connection)
# finally:
# CTaosInterface.libtaos.close(connection)
@staticmethod
def affectedRows(connection):
......
......@@ -243,8 +243,8 @@ class CTaosInterface(object):
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
except AttributeError:
raise AttributeError("sql is expected as a string")
finally:
CTaosInterface.libtaos.close(connection)
# finally:
# CTaosInterface.libtaos.close(connection)
@staticmethod
def affectedRows(connection):
......
......@@ -243,8 +243,8 @@ class CTaosInterface(object):
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
except AttributeError:
raise AttributeError("sql is expected as a string")
finally:
CTaosInterface.libtaos.close(connection)
# finally:
# CTaosInterface.libtaos.close(connection)
@staticmethod
def affectedRows(connection):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册