From: Daniele Varrazzo Date: Mon, 12 Apr 2021 15:59:57 +0000 (+0100) Subject: Drop use of PQerror in ConnectionInfo X-Git-Tag: 3.0.dev0~66^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26279bdd2f76e0bf949c0751fd58ca89c9f928c7;p=thirdparty%2Fpsycopg.git Drop use of PQerror in ConnectionInfo --- diff --git a/psycopg3/psycopg3/conninfo.py b/psycopg3/psycopg3/conninfo.py index 7e4148166..50276d67e 100644 --- a/psycopg3/psycopg3/conninfo.py +++ b/psycopg3/psycopg3/conninfo.py @@ -157,12 +157,7 @@ class ConnectionInfo: return pq.TransactionStatus(self.pgconn.transaction_status) def _get_pgconn_attr(self, name: str) -> str: - value: bytes - try: - value = getattr(self.pgconn, name) - except pq.PQerror as exc: - raise e.OperationalError(str(exc)) - + value: bytes = getattr(self.pgconn, name) return value.decode(self._pyenc) @property