| 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): |