From 3c7dd8e7305c662fb9f4c90f5b161b783b0211c4 Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Wed, 4 Jan 2023 15:29:49 +1100 Subject: [PATCH] Lower log level when lock screen window is not found (#14457) Closes #14475 Follow up for #14416 Summary of the issue: #14416 added a log message at exception level. This log message is for when the relative z-order for an NVDAObject and the lock screen cannot be determined. While a noisy exception here is useful for alpha/beta testing of this code, this log message is almost always triggered once when locking windows. This is because the lock screen may not exist while windows is in the process of locking. Description of user facing changes Lower log level --- source/utils/security.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/utils/security.py b/source/utils/security.py index 1bf5b198e89..c9ca04c10e7 100644 --- a/source/utils/security.py +++ b/source/utils/security.py @@ -257,7 +257,10 @@ def _isWindowLockScreen(hwnd: winUser.HWNDVal) -> bool: try: return _isWindowBelowWindowMatchesCond(objWindowHandle, _isWindowLockScreen) except _UnexpectedWindowCountError: - log.exception("Couldn't find lock screen") + log.debugWarning( + "Couldn't determine lock screen and NVDA object relative z-order", + exc_info=True + ) return False