Fix base_url extract stack (#36331)

* Fix base_url extract stack

* Fix tests
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-06-01 11:44:45 -07:00
1 parent cf6043fc2d
commit acbffb511d
6 files changed
+86 -98

No files matched your search

+1 -1
View File
@@ -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)