def __init__(self): if pymysql: self._mysql_version = \ 'server: (not-connected), client: "%s", thread-safe: %s' % \ (pymysql.get_client_info(), pymysql.thread_safe()) else: self._mysql_version = None
def get_connection(self, path, log=None, user=None, password=None, host=None, port=None, params={}): cnx = MySQLConnection(path, log, user, password, host, port, params) if not self.required: self._mysql_version = \ 'server: "%s", client: "%s", thread-safe: %s' \ % (cnx.cnx.get_server_info(), pymysql.get_client_info(), pymysql.thread_safe()) self.required = True return cnx