mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 11:56:25 +01:00
fix library override logic (#4474)
* fix library override logic * formatting
This commit is contained in:
parent
d16eff5039
commit
38a01988a5
@ -653,7 +653,15 @@ class EsphomeCore:
|
|||||||
f"Library {library} must be instance of Library, not {type(library)}"
|
f"Library {library} must be instance of Library, not {type(library)}"
|
||||||
)
|
)
|
||||||
for other in self.libraries[:]:
|
for other in self.libraries[:]:
|
||||||
if other.name != library.name or other.name is None or library.name is None:
|
if other.name is None or library.name is None:
|
||||||
|
continue
|
||||||
|
library_name = (
|
||||||
|
library.name if "/" not in library.name else library.name.split("/")[1]
|
||||||
|
)
|
||||||
|
other_name = (
|
||||||
|
other.name if "/" not in other.name else other.name.split("/")[1]
|
||||||
|
)
|
||||||
|
if other_name != library_name:
|
||||||
continue
|
continue
|
||||||
if other.repository is not None:
|
if other.repository is not None:
|
||||||
if library.repository is None or other.repository == library.repository:
|
if library.repository is None or other.repository == library.repository:
|
||||||
|
Loading…
Reference in New Issue
Block a user