Beispiel #1
0
 def handle_500(e):
     # shit
     try:
         db.rollback()
         db.close()
     except:
         # shit shit
         sys.exit(1)
     return render_template("internal_error.html"), 500
Beispiel #2
0
 def handle_500(e):
     # shit
     try:
         db.rollback()
         db.close()
     except:
         # shit shit
         sys.exit(1)
     return render_template("internal_error.html"), 500
Beispiel #3
0
 def go(*args, **kw):
     try:
         ret = f(*args, **kw)
         db.commit()
         return ret
     except:
         db.rollback()
         db.close()
         raise