Commit b025f0e3 authored by Lingfeng Huang's avatar Lingfeng Huang

Update prog.py

parent bf717fca
......@@ -219,7 +219,7 @@ CONTROLLER FUCNTIONS SECTION
def afficherSql(conn,sql):
try:
cur.execute(sql)
except psycopg2.Error as e:
except pg.Error as e:
print("Execute: ",e)
conn.rollback()
return
......@@ -235,8 +235,8 @@ def afficherSql(conn,sql):
else:
print("Empty table")
conn.commit()
except psycopg2.Error:
print("Fetch error")
except pg.Error as e:
print("Fetch error",e)
conn.rollback()
def afficherStatistique(conn):
......
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