MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / _get_auth_plugin_handler

Method _get_auth_plugin_handler

pymysql/connections.py:1164–1179  ·  view source on GitHub ↗
(self, plugin_name)

Source from the content-addressed store, hash-verified

1162 return pkt
1163
1164 def _get_auth_plugin_handler(self, plugin_name):
1165 plugin_class = self._auth_plugin_map.get(plugin_name)
1166 if not plugin_class and isinstance(plugin_name, bytes):
1167 plugin_class = self._auth_plugin_map.get(plugin_name.decode("ascii"))
1168 if plugin_class:
1169 try:
1170 handler = plugin_class(self)
1171 except TypeError:
1172 raise err.OperationalError(
1173 CR.CR_AUTH_PLUGIN_CANNOT_LOAD,
1174 f"Authentication plugin '{plugin_name}'"
1175 f" not loaded: - {plugin_class!r} cannot be constructed with connection object",
1176 )
1177 else:
1178 handler = None
1179 return handler
1180
1181 # _mysql support
1182 def thread_id(self):

Callers 1

Calls 1

getMethod · 0.80

Tested by

no test coverage detected