mirror of https://github.com/mahmoud/boltons.git
fix object header guessing
This commit is contained in:
parent
7faa1e506d
commit
1c7c15aca2
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue