mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
Improve error reporting for add_library (#10226)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
71efaf097b
commit
882237120e
@@ -803,6 +803,10 @@ class EsphomeCore:
|
||||
raise TypeError(
|
||||
f"Library {library} must be instance of Library, not {type(library)}"
|
||||
)
|
||||
|
||||
if not library.name:
|
||||
raise ValueError(f"The library for {library.repository} must have a name")
|
||||
|
||||
short_name = (
|
||||
library.name if "/" not in library.name else library.name.split("/")[-1]
|
||||
)
|
||||
|
Reference in New Issue
Block a user