fix python close connection error

This commit is contained in:
Hongze Cheng 2019-07-31 10:52:03 +08:00
parent 8b226b5b79
commit f0364a00d1
4 changed files with 8 additions and 8 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):