Skip to content

Commit 294dc5f

Browse files
committed
Properly check if object is iterable; close #18
1 parent 313111e commit 294dc5f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

adapter/adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def get_attribute(obj, attrs):
4747
try:
4848
if isinstance(obj, collections.Mapping):
4949
obj = obj[attr]
50-
elif isinstance(obj, (list, tuple)):
50+
elif isinstance(obj, collections.Iterable):
5151
obj = obj[int(attr)]
5252
else:
5353
obj = getattr(obj, attr)

0 commit comments

Comments
 (0)