From 543f87d2b51f0f94c8e3990dc3f65fa701a29689 Mon Sep 17 00:00:00 2001 From: Tom Sparrow <793763+sparrowt@users.noreply.github.com> Date: Fri, 25 Aug 2023 17:01:17 +0100 Subject: [PATCH] Avoid infinite recursion in Resource.__getattr__ Otherwise the `self.raw` access within the except handler below comes back through and if the originally requested item isn't actually in self.raw then it loops forever. --- jira/resources.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jira/resources.py b/jira/resources.py index c0ba80a10..1e8778963 100644 --- a/jira/resources.py +++ b/jira/resources.py @@ -189,6 +189,8 @@ def __getattr__(self, item: str) -> Any: Returns: Any: Attribute value. """ + if item in ["raw"]: + return self.__dict__[item] try: return self[item] # type: ignore except Exception as e: