fix python close connection error
This commit is contained in:
parent
8b226b5b79
commit
f0364a00d1
|
@ -243,8 +243,8 @@ class CTaosInterface(object):
|
||||||
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
|
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
raise AttributeError("sql is expected as a string")
|
raise AttributeError("sql is expected as a string")
|
||||||
finally:
|
# finally:
|
||||||
CTaosInterface.libtaos.close(connection)
|
# CTaosInterface.libtaos.close(connection)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def affectedRows(connection):
|
def affectedRows(connection):
|
||||||
|
|
|
@ -243,8 +243,8 @@ class CTaosInterface(object):
|
||||||
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
|
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
raise AttributeError("sql is expected as a string")
|
raise AttributeError("sql is expected as a string")
|
||||||
finally:
|
# finally:
|
||||||
CTaosInterface.libtaos.close(connection)
|
# CTaosInterface.libtaos.close(connection)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def affectedRows(connection):
|
def affectedRows(connection):
|
||||||
|
|
|
@ -243,8 +243,8 @@ class CTaosInterface(object):
|
||||||
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
|
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
raise AttributeError("sql is expected as a string")
|
raise AttributeError("sql is expected as a string")
|
||||||
finally:
|
# finally:
|
||||||
CTaosInterface.libtaos.close(connection)
|
# CTaosInterface.libtaos.close(connection)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def affectedRows(connection):
|
def affectedRows(connection):
|
||||||
|
|
|
@ -243,8 +243,8 @@ class CTaosInterface(object):
|
||||||
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
|
return CTaosInterface.libtaos.taos_query(connection, ctypes.c_char_p(sql.encode('utf-8')))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
raise AttributeError("sql is expected as a string")
|
raise AttributeError("sql is expected as a string")
|
||||||
finally:
|
# finally:
|
||||||
CTaosInterface.libtaos.close(connection)
|
# CTaosInterface.libtaos.close(connection)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def affectedRows(connection):
|
def affectedRows(connection):
|
||||||
|
|
Loading…
Reference in New Issue