Better display of descriptors

This commit is contained in:
Dave Halter
2017-12-29 03:29:08 +01:00
parent 35158f693d
commit a1051bd5f2

View File

@@ -91,7 +91,7 @@ def safe_getattr(obj, name, default=_sentinel):
raise
return default
else:
if is_get_descriptor and type(attr) in ALLOWED_DESCRIPTOR_ACCESS:
if type(attr) in ALLOWED_DESCRIPTOR_ACCESS:
# In case of descriptors that have get methods we cannot return
# it's value, because that would mean code execution.
return getattr(obj, name)