Fix base_url extract stack (#36331)
* Fix base_url extract stack * Fix tests
This commit is contained in:
1 parent
cf6043fc2d
commit
acbffb511d
6 files changed
+86
-98
No files matched your search
@@ -133,7 +133,7 @@ class ApiConfig:
|
||||
def base_url(self) -> str:
|
||||
"""Proxy property to find caller of this deprecated property."""
|
||||
found_frame = None
|
||||
for frame in reversed(extract_stack()):
|
||||
for frame in reversed(extract_stack()[:-1]):
|
||||
for path in ("custom_components/", "homeassistant/components/"):
|
||||
try:
|
||||
index = frame.filename.index(path)
|
||||
|
||||
Reference in new issue
Block a user