mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 08:56:34 +03:00
Use except psycopg2.Error as e
in example.
This commit is contained in:
parent
9f020124f8
commit
329f43c762
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user