Commit db7bbd3e authored by Lingfeng Huang's avatar Lingfeng Huang

Update prog.py

parent 12edbdeb
......@@ -96,10 +96,10 @@ def afficherTable(conn,table):
sql = "SELECT * FROM "+table
try:
cur.execute(sql)
except psycopg2.UndefinedTable:
except pg.UndefinedTable:
print("Table doesn't exist")
conn.rollback()
except psycopg2.InFailedSqlTransaction:
except pg.InFailedSqlTransaction:
print("Transaction Error")
conn.rollback()
# Fetch data line by line
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment