Properly handle no __getitem__ on CompiledObject
This commit is contained in:
1 parent
fcda62862c
commit
fcda3f7bc5
3 files changed
+22
-3
No files matched your search
@@ -233,6 +233,9 @@ class DirectObjectAccess(object):
|
||||
return self._create_access_path(self._obj[index])
|
||||
|
||||
def py__iter__list(self):
|
||||
if not hasattr(self._obj, '__getitem__'):
|
||||
return None
|
||||
|
||||
if type(self._obj) not in (str, list, tuple, unicode, bytes, bytearray, dict):
|
||||
# Get rid of side effects, we won't call custom `__getitem__`s.
|
||||
return []
|
||||
|
||||
Reference in new issue
Block a user