Skip to content

Commit

Permalink
Remove logging when old-style class exceptions are raised
Browse files Browse the repository at this point in the history
This should not happen as we're dealing with parsed documents here and
even if it happened, the solution is to not raise old-style class
exceptions.
  • Loading branch information
rbu authored and hannosch committed May 13, 2017
1 parent 598ab5d commit 3ceeb89
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/App/special_dtml.py
Expand Up @@ -14,7 +14,6 @@
import os
import sys
from logging import getLogger
from types import InstanceType

import DocumentTemplate
import MethodObject
Expand Down Expand Up @@ -204,14 +203,6 @@ def _exec(self, bound_data, args, kw):
result = render_blocks(self._v_blocks, ns)
except DTReturn as v:
result = v.v
except AttributeError:
if (type(sys.exc_info()[1]) == InstanceType and
sys.exc_value.args[0] == "_v_blocks"):
LOG.warn("DTML file '%s' could not be read" % self.raw)
raise ValueError(
"DTML file error: Check logfile for details")
else:
raise

self.ZDocumentTemplate_afterRender(ns, result)
return result
Expand Down

0 comments on commit 3ceeb89

Please sign in to comment.