MCPcopy
hub / github.com/PyMySQL/PyMySQL / _get_auth_plugin_handler

Method _get_auth_plugin_handler

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

Source from the content-addressed store, hash-verified

1107 return pkt
1108
1109 def _get_auth_plugin_handler(self, plugin_name):
1110 plugin_class = self._auth_plugin_map.get(plugin_name)
1111 if not plugin_class and isinstance(plugin_name, bytes):
1112 plugin_class = self._auth_plugin_map.get(plugin_name.decode("ascii"))
1113 if plugin_class:
1114 try:
1115 handler = plugin_class(self)
1116 except TypeError:
1117 raise err.OperationalError(
1118 CR.CR_AUTH_PLUGIN_CANNOT_LOAD,
1119 f"Authentication plugin '{plugin_name}'"
1120 f" not loaded: - {plugin_class!r} cannot be constructed with connection object",
1121 )
1122 else:
1123 handler = None
1124 return handler
1125
1126 # _mysql support
1127 def thread_id(self):

Callers 1

_process_authMethod · 0.95

Calls 1

getMethod · 0.80

Tested by

no test coverage detected