Example #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
Example #2
0
 def go(*args, **kw):
     try:
         ret = f(*args, **kw)
         db.commit()
         return ret
     except:
         db.rollback()
         db.close()
         raise
Example #3
0
 def handle_500(e):
     # shit
     try:
         db.rollback()
         db.close()
     except:
         # shit shit
         sys.exit(1)
     return render_template("internal_error.html"), 500
 def go(*args, **kw):
     try:
         ret = f(*args, **kw)
         db.commit()
         return ret
     except:
         db.rollback()
         db.close()
         raise