Adds guards for missing information in call stack frames (#27217)

This commit is contained in:
Franck Nijhof 2019-10-05 11:59:34 +02:00 committed by Pascal Vizeli
parent 71a3516053
commit 2e17ad86af
5 changed files with 34 additions and 12 deletions

View file

@ -600,7 +600,8 @@ def deprecated(
if module is not None:
module_name = module.__name__
else:
# Unclear when it is None, but it happens, so let's guard.
# If Python is unable to access the sources files, the call stack frame
# will be missing information, so let's guard.
# https://github.com/home-assistant/home-assistant/issues/24982
module_name = __name__