Skip to content

Commit

Permalink
moved method to class level
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jul 11, 2017
1 parent b140b39 commit 9380e65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/appier_extras/parts/admin/part.py
Expand Up @@ -251,8 +251,9 @@ def before_request(self):

def exception_handler(self, error):
import traceback
cls = self.__class__
lines = traceback.format_exc().splitlines()
lines = self._lines(lines)
lines = cls._lines(lines)
lines = lines if self.owner.is_devel() else []
return self.template(
"error.html.tpl",
Expand Down
4 changes: 3 additions & 1 deletion src/appier_extras/parts/opbeat/part.py
Expand Up @@ -79,6 +79,8 @@ def log_exception(
is_soft = False,
strict = False
):
cls = self.__class__

if not strict and is_soft: return

api = self._get_api()
Expand All @@ -91,7 +93,7 @@ def log_exception(
exception.message or str(exception)

lines = traceback.format_exc().splitlines()
lines = self._lines(lines)
lines = cls._lines(lines)

payload = dict(
message = message,
Expand Down

0 comments on commit 9380e65

Please sign in to comment.