From d3057130edf42bb5312405f63559b2224a26b45c Mon Sep 17 00:00:00 2001 From: moi15moi <80980684+moi15moi@users.noreply.github.com> Date: Tue, 28 Jan 2025 20:10:44 -0500 Subject: [PATCH] [_post_coinit\unknwn.py] Remove unused parameter in _shutdown (#777) --- comtypes/_post_coinit/unknwn.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/comtypes/_post_coinit/unknwn.py b/comtypes/_post_coinit/unknwn.py index e1e29c2e..fe2847f2 100644 --- a/comtypes/_post_coinit/unknwn.py +++ b/comtypes/_post_coinit/unknwn.py @@ -1,7 +1,6 @@ # https://learn.microsoft.com/en-us/windows/win32/api/unknwn/ import logging -import sys from ctypes import HRESULT, POINTER, byref, c_ulong, c_void_p from typing import TYPE_CHECKING, ClassVar, List, Optional, Type, TypeVar @@ -19,10 +18,7 @@ def _shutdown( func=_CoUninitialize, _debug=logger.debug, - _exc_clear=getattr(sys, "exc_clear", lambda: None), ): - # Make sure no COM pointers stay in exception frames. - _exc_clear() # Sometimes, CoUninitialize, running at Python shutdown, # raises an exception. We suppress this when __debug__ is # False.