Browse Source

Correction raise LeApiErrors

prieto 9 years ago
parent
commit
521f81728d
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      lodel/leapi/leobject.py

+ 3
- 1
lodel/leapi/leobject.py View File

@@ -86,11 +86,13 @@ class LeObject(object):
86 86
                     )
87 87
                 else:
88 88
                     err_list.append(
89
-                        AttributeError("Unknown fieldname : '%s'" % fieldname)
89
+                        LeApiError("Unknown fieldname : '%s'" % fieldname)
90 90
                     )
91 91
             else:
92 92
                 self.__datas[fieldname] = fieldval
93 93
                 self.__initialized = list()
94
+        if len(err_list) > 0:
95
+            raise LeApiErrors(err_list)
94 96
         self.__set_initialized()
95 97
     
96 98
     #-----------------------------------#

Loading…
Cancel
Save