Fix some side effects of EDS import, while editing afterward
authorEdouard Tisserant
Wed, 13 Apr 2011 16:29:59 +0200
changeset 659 1041153c5fd2
parent 658 7758d60e9260
child 660 cff8e50333e8
Fix some side effects of EDS import, while editing afterward
objdictgen/node.py
--- a/objdictgen/node.py	Fri Jan 28 14:51:18 2011 +0100
+++ b/objdictgen/node.py	Wed Apr 13 16:29:59 2011 +0200
@@ -973,8 +973,11 @@
         while not result and i < len(mappings):
             result = FindEntryInfos(index, mappings[i], compute)
             i += 1
-        if result == None:
-            result = FindEntryInfos(index, MappingDictionary, compute)
+        r301 = FindEntryInfos(index, MappingDictionary, compute)
+        if r301 :
+            if result is not None:
+                r301.update(result)
+            return r301
         return result
     
     def GetSubentryInfos(self, index, subIndex, compute=True):
@@ -986,10 +989,13 @@
             if result:
                 result["user_defined"] = i == len(mappings) - 1 and index >= 0x1000
             i += 1
-        if result == None:
-            result = FindSubentryInfos(index, subIndex, MappingDictionary, compute)
-            if result:
-                result["user_defined"] = False
+        r301 = FindSubentryInfos(index, subIndex, MappingDictionary, compute)
+        if r301 :
+            if result is not None:
+                r301.update(result)
+            else:
+                r301["user_defined"] = False
+            return r301
         return result
     
     def GetTypeIndex(self, typename):