diff -r 5ea038882dd6 -r c1a2ff7e3575 scripts/uninstall.py --- a/scripts/uninstall.py Tue Nov 21 11:42:45 2023 +0100 +++ b/scripts/uninstall.py Wed Nov 22 17:19:10 2023 +0100 @@ -13,6 +13,7 @@ import argparse import contextlib import glob +import importlib import os import shutil import sys @@ -237,9 +238,7 @@ """ Clean up the Desktop and Start Menu entries for Windows. """ - try: - from pywintypes import com_error # __IGNORE_WARNING__ - except ImportError: + if importlib.util.find_spec("pywintypes") is None: # links were not created by install.py return