Skip to content

Commit

Permalink
Lower log level when lock screen window is not found (#14457)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
seanbudd authored Jan 4, 2023
1 parent 23df2cb commit 3c7dd8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/utils/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 3c7dd8e

Please sign in to comment.