from __future__ import generators
import os, re, sys, types, inspect
+from m5 import panic
from convert import *
noDot = False
raise AttributeError, \
'Parent of %s type %s not found at path %s' \
% (base.name, ptype, self._path)
- found, done = obj.find(ptype, self._path)
- if isinstance(found, Proxy):
- done = False
+ result, done = obj.find(ptype, self._path)
obj = obj.parent
- return self._mulcheck(found)
+ if isinstance(result, Proxy):
+ result = result.unproxy(obj, ptype)
+
+ return self._mulcheck(result)
def getindex(obj, index):
if index == None:
def __str__(self):
return str(self._getattr())
+ def __len__(self):
+ return len(self._getattr())
+
# Regular parameter.
class _Param(object):
def __init__(self, ptype, *args, **kwargs):