mirror of
https://github.com/esphome/esphome.git
synced 2025-03-15 15:18:16 +00:00
Fix validation infinite loop with empty platform block (#598)
* Fix validation infinite loop with empty platform block * Update util.py
This commit is contained in:
parent
25e41c6159
commit
a09459d7cd
@ -187,6 +187,8 @@ 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 len(self) == 1:
|
||||||
|
return
|
||||||
if last:
|
if 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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user