Skip to content

Commit

Permalink
Import traceback from the standard library
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Jul 23, 2020
1 parent 8a3b246 commit 525351f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions infogami/utils/template.py
Expand Up @@ -10,10 +10,11 @@
"""
import os
import time
import traceback

import web

from infogami.utils import storage
from infogami.utils import delegate, storage, view

# There are some backward-incompatible changes in web.py 0.34 which makes Infogami fail.
assert web.__version__ != "0.34", "Please pip install --upgrade web.py"
Expand Down Expand Up @@ -151,13 +152,8 @@ def saferender(templates, *a, **kw):
if i.debug.lower() == "true":
raise

from . import delegate
delegate.register_exception()

from . import traceback
traceback.print_exc()

from . import view
message = str(t.filename) + ': error in processing template: ' + e.__class__.__name__ + ': ' + str(e) + ' (falling back to default template)'
view.add_flash_message('error', message)

Expand Down

0 comments on commit 525351f

Please sign in to comment.