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

Method _get_auth_plugin_handler

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

Source from the content-addressed store, hash-verified

1152 return pkt
1153
1154 def _get_auth_plugin_handler(self, plugin_name):
1155 plugin_class = self._auth_plugin_map.get(plugin_name)
1156 if not plugin_class and isinstance(plugin_name, bytes):
1157 plugin_class = self._auth_plugin_map.get(plugin_name.decode("ascii"))
1158 if plugin_class:
1159 try:
1160 handler = plugin_class(self)
1161 except TypeError:
1162 raise err.OperationalError(
1163 CR.CR_AUTH_PLUGIN_CANNOT_LOAD,
1164 f"Authentication plugin '{plugin_name}'"
1165 f" not loaded: - {plugin_class!r} cannot be constructed with connection object",
1166 )
1167 else:
1168 handler = None
1169 return handler
1170
1171 # _mysql support
1172 def thread_id(self):

Callers 1

Calls 1

getMethod · 0.80

Tested by

no test coverage detected