Skip to content

Commit f49d589

Browse files
authored
Merge pull request #20 from alexei/bugfix/proper_iterable_check
Properly check if object is iterable; close #18
2 parents 313111e + 294dc5f commit f49d589

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)