summaryrefslogtreecommitdiff
path: root/tools/dtoc/fdt.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dtoc/fdt.py')
-rw-r--r--tools/dtoc/fdt.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py
index 9749966d5f..429e95f9a9 100644
--- a/tools/dtoc/fdt.py
+++ b/tools/dtoc/fdt.py
@@ -163,13 +163,14 @@ class Prop:
self.value = new_value
self.type = newprop.type
- if type(newprop.value) == list and type(self.value) != list:
- self.value = [self.value]
-
- if type(self.value) == list and len(newprop.value) > len(self.value):
- val = self.GetEmpty(self.type)
- while len(self.value) < len(newprop.value):
- self.value.append(val)
+ if type(newprop.value) == list:
+ if type(self.value) != list:
+ self.value = [self.value]
+
+ if len(newprop.value) > len(self.value):
+ val = self.GetEmpty(self.type)
+ while len(self.value) < len(newprop.value):
+ self.value.append(val)
@classmethod
def GetEmpty(self, type):