You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RichTraceback class constructor accepts an optional traceback parameter.
However when passing a not null object, an exception is raised:
<...>
File "<...>/mako/exceptions.py", line 156, in _init
return (type, value, new_trcback)
variable 'type' referenced before assignment
The bug is in the _init method:
def _init(self, trcback):
"""format a traceback from sys.exc_info() into 7-item tuples,
containing the regular four traceback tuple items, plus the
original template filename, the line number adjusted relative to
the template source, and code line from that line number of the
template."""
import mako.template
mods = {}
if not trcback:
(type, value, trcback) = sys.exc_info()
type and value variables are only assigned if trcback is None.
The main problem with RichTraceback, however, is that it is not possible to specify a custom exc_info to use when rendering the traceback.
Thanks Manlio Perillo
The text was updated successfully, but these errors were encountered:
Migrated issue, originally created by Anonymous
Hi.
The
RichTraceback
class constructor accepts an optionaltraceback
parameter.However when passing a not null object, an exception is raised:
The bug is in the
_init
method:type
andvalue
variables are only assigned iftrcback
isNone
.The main problem with
RichTraceback
, however, is that it is not possible to specify a customexc_info
to use when rendering the traceback.Thanks Manlio Perillo
The text was updated successfully, but these errors were encountered: