--- a/scripts/create_windows_links.py Thu Apr 15 16:52:05 2021 +0200 +++ b/scripts/create_windows_links.py Thu Apr 15 18:11:24 2021 +0200 @@ -11,6 +11,7 @@ import os import sys +import contextlib from eric6config import getConfig @@ -93,16 +94,13 @@ from win32com.client import Dispatch from pywintypes import com_error - try: + with contextlib.suppress(com_error): shell = Dispatch('WScript.Shell') shortcut = shell.CreateShortCut(linkPath) shortcut.Targetpath = targetPath shortcut.WorkingDirectory = os.path.dirname(targetPath) shortcut.IconLocation = iconPath shortcut.save() - except com_error: - # maybe restrictions prohibited link creation - pass def windowsDesktopNames():