Skip to content

Commit

Permalink
Fix import error (#10)
Browse files Browse the repository at this point in the history
Fix import error with last alpha (NVDA 2023.2 dev cycle)

---------

Co-authored-by: Cyrille Bougot <[email protected]>
  • Loading branch information
nvdaes and CyrilleB79 authored Jul 7, 2023
1 parent da44809 commit c1ae17c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions addon/globalPlugins/charinfo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
import globalVars
import config
from utils import security

# Temporarily import private function as advised by Sean Budd from NVAccess.
# A public API can be requested by add-on developers 2-3 month after 2022.3.3 release if no issue is found.
from winAPI.sessionTracking import _isLockScreenModeActive

try:
# For NVDA >= 2023.2
from winAPI.sessionTracking import isLockScreenModeActive
except ImportError:
# For NVDA < 2023.2
from winAPI.sessionTracking import _isLockScreenModeActive as isLockScreenModeActive
import sys
import os
import re
Expand Down Expand Up @@ -1000,7 +1001,7 @@ def script_review_currentCharacter(self, gesture):
elif scriptCount <= 2:
commands.script_review_currentCharacter(gesture)
return
if _isLockScreenModeActive():
if isLockScreenModeActive():
# In lock screen do not display character info. The character information window would appear only
# once the session is reopened, which is quite useless and confusing.
return
Expand Down

0 comments on commit c1ae17c

Please sign in to comment.