def handle_ERROR_RESPONSE(self, data, context): msg = dict(( s[:1].decode("ascii"), s[1:].decode(self._client_encoding, errors="replace"), ) for s in data.split(NULL_BYTE) if s != b"") self.error = DatabaseError(msg)
def handle_ERROR_RESPONSE(self, data, ps): msg = dict( (s[:1].decode(self._client_encoding), s[1:].decode(self._client_encoding)) for s in data.split(NULL_BYTE) if s != b"" ) self.error = DatabaseError(msg)
def handle_EMPTY_QUERY_RESPONSE(self, data, ps): self.error = DatabaseError("query was empty")