replace propery with safe_property in some evaluate cases. fixes #249

This commit is contained in:
Dave Halter committed 2014-01-15 15:07:06 +01:00
1 parent 99882724da
commit d5aa36cc69
4 files changed
+13 -13

No files matched your search

+5 -2
View File
@@ -13,7 +13,6 @@ class MultiLevelStopIteration(Exception):
"""
StopIteration's get catched pretty easy by for loops, let errors propagate.
"""
pass
class UncaughtAttributeError(Exception):
@@ -29,7 +28,11 @@ class UncaughtAttributeError(Exception):
"""
def rethrow_uncaught(func):
def safe_property(func):
return property(reraise_uncaught(func))
def reraise_uncaught(func):
"""
Re-throw uncaught `AttributeError`.