(self, exc_type)
| 2012 | message_type + self.MESSAGE_LENGTH.pack(length) + payload) |
| 2013 | |
| 2014 | def _write_error_response(self, exc_type): |
| 2015 | fields = ( |
| 2016 | (b'S', b'FATAL'), # Severity |
| 2017 | (b'C', exc_type.sqlstate.encode('ascii')), # SQLSTATE |
| 2018 | (b'M', b'proxy startup error'), # Message |
| 2019 | ) |
| 2020 | payload = b''.join(tag + value + b'\0' for tag, value in fields) |
| 2021 | self._write_message(b'E', payload + b'\0') |
| 2022 | |
| 2023 | |
| 2024 | class BaseTestSSLConnection(tb.ConnectedTestCase, tb.ProxiedClusterTestCase): |