From 329f43c76233ebb85f762f05f0b936f3ac5c223f Mon Sep 17 00:00:00 2001 From: Xing Guo Date: Thu, 27 Jul 2023 09:49:46 +0800 Subject: [PATCH] Use `except psycopg2.Error as e` in example. --- doc/src/module.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/module.rst b/doc/src/module.rst index 821fd3cf..5793b1ca 100644 --- a/doc/src/module.rst +++ b/doc/src/module.rst @@ -184,7 +184,7 @@ available through the following exceptions: >>> try: ... cur.execute("SELECT * FROM barf") - ... except psycopg2.Error, e: + ... except psycopg2.Error as e: ... pass >>> e.diag.severity