MCPcopy Create free account
hub / github.com/dbcli/mssql-cli / close_cn

Function close_cn

tests/features/db_utils.py:73–80  ·  view source on GitHub ↗

Close connection. :param connection: psycopg2.connection

(cn=None)

Source from the content-addressed store, hash-verified

71
72
73def close_cn(cn=None):
74 """
75 Close connection.
76 :param connection: psycopg2.connection
77 """
78 if cn:
79 cn.close()
80 print('Closed connection: {0}.'.format(cn.dsn))

Callers 1

drop_dbFunction · 0.85

Calls 2

closeMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected