From cb3344f3bd414d5213e987671df8b25d23171232 Mon Sep 17 00:00:00 2001 From: MrTeferi Date: Sun, 5 Nov 2023 00:24:34 -0500 Subject: [PATCH] refactor(Photoshop): Remove unnecessary exception type from suppress --- photoshop/api/_core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/photoshop/api/_core.py b/photoshop/api/_core.py index 5d659ae3..28be680a 100644 --- a/photoshop/api/_core.py +++ b/photoshop/api/_core.py @@ -48,8 +48,8 @@ def __init__(self, ps_version: Optional[str] = None, parent: Any = None): os.environ["PS_VERSION"] = ps_version # Establish the application object using provided version ID - if self._app_id: - self.app = self._get_application_object([self._app_id]) + if self.app_id: + self.app = self._get_application_object([self.app_id]) if not self.app: # Attempt unsuccessful self._logger.debug( @@ -187,7 +187,7 @@ def _get_application_object(self, versions: List[str] = None) -> Optional[Dispat """ for v in versions: self.app_id = v - with suppress(OSError, AttributeError): + with suppress(OSError): return CreateObject(self.program_name, dynamic=True) return