scripts/uninstall.py

branch
eric7
changeset 10331
c1a2ff7e3575
parent 10300
60e8f2175b3b
child 10334
24300d16a154
--- 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
 

eric ide

mercurial