Skip to content

Commit

Permalink
Some objects may not have classes in pre-Python 2.5 (fixes GH-49)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Nov 30, 2010
1 parent 2b43b69 commit a6852a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sentry/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,12 @@ def contains(iterator, value):
kwargs['view'] = view

data = kwargs.pop('data', {}) or {}
if hasattr(exc_type, '__class__'):
exc_module = exc_type.__class__.__module__
else:
exc_module = None
data['__sentry__'] = {
'exc': map(transform, [exc_type.__class__.__module__, exc_value.args, frames]),
'exc': map(transform, [exc_module, exc_value.args, frames]),
}

if isinstance(exc_value, TemplateSyntaxError) and hasattr(exc_value, 'source'):
Expand Down

0 comments on commit a6852a7

Please sign in to comment.