Skip to content
Browse files

Ensure namedtuple doesnt fail on transforms

  • Loading branch information...
1 parent cc7acf8 commit 551d71092fc59f025cd670a7f26934f7e8a1e55b @dcramer committed Sep 7, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 sentry/utils/__init__.py
View
5 sentry/utils/__init__.py
@@ -88,7 +88,10 @@ def transform(value, stack=[], context=None):
ret = 'cycle'
transform_rec = lambda o: transform(o, stack + [value], context)
if isinstance(value, (tuple, list, set, frozenset)):
- ret = type(value)(transform_rec(o) for o in value)
+ try:
+ ret = type(value)(transform_rec(o) for o in value[:])
+ except:
+ ret = tuple(transform_rec(o) for o in value)
elif isinstance(value, uuid.UUID):
ret = repr(value)
elif isinstance(value, datetime.datetime):

0 comments on commit 551d710

Please sign in to comment.
Something went wrong with that request. Please try again.