From 4447ac5f1adf60f2b0afb64ace99682157c2e5de Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 24 Apr 2013 22:06:53 +0200 Subject: [PATCH] Revert wrong changes on temporary_attribute_value We don't want to ignore any error. Signed-off-by: Julien Danjou --- hy/util.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hy/util.py b/hy/util.py index b855038..6b26543 100644 --- a/hy/util.py +++ b/hy/util.py @@ -34,12 +34,7 @@ def temporary_attribute_value(obj, attribute, value): """Temporarily switch an object attribute value to another value.""" original_value = getattr(obj, attribute) setattr(obj, attribute, value) - - try: - yield - except Exception: - pass - + yield setattr(obj, attribute, original_value)