diff --git a/addon/globalPlugins/soundSplitter/pycaw/pycaw.py b/addon/globalPlugins/soundSplitter/pycaw/pycaw.py index 96a9c7a..0500be7 100644 --- a/addon/globalPlugins/soundSplitter/pycaw/pycaw.py +++ b/addon/globalPlugins/soundSplitter/pycaw/pycaw.py @@ -8,11 +8,17 @@ from enum import Enum import comtypes +from logHandler import log import sys if sys.version_info.major == 2: import psutilpy2 as psutil else: - from .. import psutil + try: + import psutil + log.debug("Imported psutil directly.") + except ModuleNotFoundError: + from .. import psutil + log.debug("Imported built-in copy of psutil.") from comtypes import COMMETHOD, GUID, IUnknown from comtypes.automation import VARTYPE, VT_BOOL, VT_CLSID, VT_LPWSTR, VT_UI4 from .. future.utils import python_2_unicode_compatible @@ -590,7 +596,7 @@ def Process(self): try: self._process = psutil.Process(self.ProcessId) except psutil.NoSuchProcess: - # for some reason GetProcessId returned an non existing pid + # for some reason GetProcessId returned a non existing pid return None return self._process diff --git a/buildVars.py b/buildVars.py index d04b67a..c92b5f4 100644 --- a/buildVars.py +++ b/buildVars.py @@ -25,7 +25,7 @@ def _(arg): # Translators: Long description to be shown for this add-on on add-on information from add-ons manager "addon_description": _("Splits sound from NvDA screen reader and other programs to separate channels"), # version - "addon_version": "24.0.1", + "addon_version": "24.0.2", # Author(s) "addon_author": "Luke Davis , Joseph Lee ", # URL for the add-on documentation support diff --git a/changelog.md b/changelog.md index c363a60..21b88bf 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # Changelog: +### 24.0.2 + +* Import psutil from NVDA itself, if running NVDA 2024.2. + ### 24.0.0 * Compatibility with NVDA 2024.1.