forked from VimPlug/jedi
added a common.MultiLevelAttributeError to copying, because there were some problems
This commit is contained in:
@@ -649,19 +649,22 @@ class Execution(Executable):
|
|||||||
objects can be used for the executions, as if they were in the
|
objects can be used for the executions, as if they were in the
|
||||||
execution.
|
execution.
|
||||||
"""
|
"""
|
||||||
# Copy all these lists into this local function.
|
try:
|
||||||
attr = getattr(self.base, prop)
|
# Copy all these lists into this local function.
|
||||||
objects = []
|
attr = getattr(self.base, prop)
|
||||||
for element in attr:
|
objects = []
|
||||||
if element is None:
|
for element in attr:
|
||||||
copied = element
|
if element is None:
|
||||||
else:
|
copied = element
|
||||||
copied = helpers.fast_parent_copy(element)
|
else:
|
||||||
copied.parent = self._scope_copy(copied.parent)
|
copied = helpers.fast_parent_copy(element)
|
||||||
if isinstance(copied, parsing.Function):
|
copied.parent = self._scope_copy(copied.parent)
|
||||||
copied = Function(copied)
|
if isinstance(copied, parsing.Function):
|
||||||
objects.append(copied)
|
copied = Function(copied)
|
||||||
return objects
|
objects.append(copied)
|
||||||
|
return objects
|
||||||
|
except AttributeError:
|
||||||
|
raise common.MultiLevelAttributeError(sys.exc_info())
|
||||||
|
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
if name not in ['start_pos', 'end_pos', 'imports']:
|
if name not in ['start_pos', 'end_pos', 'imports']:
|
||||||
|
|||||||
Reference in New Issue
Block a user