Don't get code_context when calling inspect.stack (#48849)
* Don't get code_context when calling inspect.stack * Update homeassistant/helpers/config_validation.py
This commit is contained in:
parent
19e047e801
commit
d1df6e6fba
3 changed files with 3 additions and 3 deletions
|
@ -711,7 +711,7 @@ def deprecated(
|
|||
- No warning if neither key nor replacement_key are provided
|
||||
- Adds replacement_key with default value in this case
|
||||
"""
|
||||
module = inspect.getmodule(inspect.stack()[1][0])
|
||||
module = inspect.getmodule(inspect.stack(context=0)[1].frame)
|
||||
if module is not None:
|
||||
module_name = module.__name__
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue