fix object header guessing

This commit is contained in:
Mahmoud Hashemi 2014-02-24 20:43:24 -08:00
parent 7faa1e506d
commit 1c7c15aca2
1 changed files with 6 additions and 1 deletions

View File

@ -117,7 +117,12 @@ class ObjectInputType(InputType):
headers = []
for attr in dir(obj):
# an object's __dict__ could have non-string keys but meh
try:
val = getattr(obj, attr)
except:
# seen on greenlet: `run` shows in dir() but raises
# AttributeError. Also properties misbehave.
continue
if callable(val):
continue
headers.append(attr)