mirror of
https://github.com/esphome/esphome.git
synced 2025-03-16 15:48:16 +00:00
Fix validation infinite loop with empty platform block
This commit is contained in:
parent
f31c1480f3
commit
6c1024e9cb
@ -187,7 +187,9 @@ class OrderedDict(collections.OrderedDict):
|
|||||||
|
|
||||||
def move_to_end(self, key, last=True):
|
def move_to_end(self, key, last=True):
|
||||||
if IS_PY2:
|
if IS_PY2:
|
||||||
if last:
|
if len(self) == 1:
|
||||||
|
return
|
||||||
|
elif last:
|
||||||
# When moving to end, just pop and re-add
|
# When moving to end, just pop and re-add
|
||||||
val = self.pop(key)
|
val = self.pop(key)
|
||||||
self[key] = val
|
self[key] = val
|
||||||
|
Loading…
x
Reference in New Issue
Block a user