mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 10:23:43 +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:
|
>>> try:
|
||||||
... cur.execute("SELECT * FROM barf")
|
... cur.execute("SELECT * FROM barf")
|
||||||
... except psycopg2.Error, e:
|
... except psycopg2.Error as e:
|
||||||
... pass
|
... pass
|
||||||
|
|
||||||
>>> e.diag.severity
|
>>> e.diag.severity
|
||||||
|
|
Loading…
Reference in New Issue
Block a user