예제 #1
0
파일: app.py 프로젝트: RockyTV/truecraft.io
 def handle_500(e):
     # shit
     try:
         db.rollback()
         db.close()
     except:
         # shit shit
         sys.exit(1)
     return render_template("internal_error.html"), 500
예제 #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
예제 #3
0
 def go(*args, **kw):
     try:
         ret = f(*args, **kw)
         db.commit()
         return ret
     except:
         db.rollback()
         db.close()
         raise