seitime-frappe/frappe/www/error.py
Suraj Shetty c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30

14 lines
339 B
Python

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
no_cache = 1
def get_context(context):
if frappe.flags.in_migrate:
return
context.http_status_code = 500
print(frappe.get_traceback())
return {"error": frappe.get_traceback().replace("<", "&lt;").replace(">", "&gt;")}