]> granicus.if.org Git - esp-idf/commitdiff
ldgen: fix issues when using pyparsing 2.3.0
authorRenz Christian Bagaporo <renz@espressif.com>
Mon, 19 Nov 2018 10:30:24 +0000 (18:30 +0800)
committerRenz Christian Bagaporo <renz@espressif.com>
Thu, 22 Nov 2018 01:55:31 +0000 (09:55 +0800)
tools/ldgen/fragments.py

index f088515299103cd03911747042978b87175ce02e..d28ce01bad867801e33307bd2e54472c233c6117 100644 (file)
@@ -183,15 +183,20 @@ class Mapping(Fragment):
     def _process_entries(self):
         processed = []
 
-        for normal_group in self.entries.normal_groups:
+        for normal_group in self.entries[0]:
             # Get the original string of the condition
             condition  = next(iter(normal_group.condition.asList())).strip()
-            mappings = self._create_mappings_set(normal_group.mappings)
-
+            mappings = self._create_mappings_set(normal_group[1])  
+            
             processed.append((condition, mappings))
+    
+        default_group = self.entries[1]
+
+        if len(default_group) > 1:
+            mappings = self._create_mappings_set(default_group[1])
+        else:
+            mappings = self._create_mappings_set(default_group[0])
 
-        default_group = self.entries.default_group
-        mappings = self._create_mappings_set(default_group.mappings)
         processed.append(("default", mappings))
 
         self.entries = processed