Skip to content

Commit 761b8a1

Browse files
authored
Merge 26c24b8 into a1a6598
2 parents a1a6598 + 26c24b8 commit 761b8a1

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

source/config/__init__.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,16 @@ def getStartOnLogonScreen() -> bool:
387387
log.debugWarning(f"Could not find NVDA reg key {RegistryKey.NVDA}", exc_info=True)
388388
except WindowsError:
389389
log.error(f"Failed to open NVDA reg key {RegistryKey.NVDA}", exc_info=True)
390-
try:
391-
return bool(winreg.QueryValueEx(k, "startOnLogonScreen")[0])
392-
except FileNotFoundError:
393-
log.debug(f"Could not find startOnLogonScreen value for {RegistryKey.NVDA} - likely unset.")
394-
return False
395-
except WindowsError:
396-
log.error(f"Failed to query startOnLogonScreen value for {RegistryKey.NVDA}", exc_info=True)
397-
return False
390+
else:
391+
try:
392+
return bool(winreg.QueryValueEx(k, "startOnLogonScreen")[0])
393+
except FileNotFoundError:
394+
log.debug(f"Could not find startOnLogonScreen value for {RegistryKey.NVDA} - likely unset.")
395+
return False
396+
except WindowsError:
397+
log.error(f"Failed to query startOnLogonScreen value for {RegistryKey.NVDA}", exc_info=True)
398+
return False
399+
return False
398400

399401

400402
def _setStartOnLogonScreen(enable: bool) -> None:

0 commit comments

Comments
 (0)