1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-13 22:28:14 +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:
Otto Winter 2019-06-03 09:41:33 +02:00 committed by GitHub
parent 8c9ac1c906
commit 2520d49ad4

View File

@ -187,6 +187,8 @@ class OrderedDict(collections.OrderedDict):
def move_to_end(self, key, last=True):
if IS_PY2:
if len(self) == 1:
return
if last:
# When moving to end, just pop and re-add
val = self.pop(key)