|
@@ -124,10 +124,10 @@ class LeType(object):
|
124
|
124
|
if not allow_internal and dname in autom_fields:
|
125
|
125
|
raise AttributeError("The field '%s' is internal"%(dname))
|
126
|
126
|
if dname not in cls._fields:
|
127
|
|
- raise AttributeError("No such field '%s' for %s"%(dname, self.__class__.__name__))
|
|
127
|
+ raise AttributeError("No such field '%s' for %s"%(dname, cls.__name__))
|
128
|
128
|
cls._fieldtypes[dname].check_or_raise(dval)
|
129
|
129
|
|
130
|
|
- fields = [f for f, ft in cls._fieldtypes.items() if not hasattr(ft,'internal') or not ft.internal]
|
|
130
|
+ fields = [f for f, ft in cls._fieldtypes.items() if not hasattr(ft,'internal') or not ft.internal and f in cls._fields]
|
131
|
131
|
if complete and len(datas) < len(fields):
|
132
|
132
|
raise LeObjectError("The argument complete was True but some fields are missing : %s"%(set(fields) - set(datas.keys())))
|
133
|
133
|
|