Skip to content

Commit 2fe4691

Browse files
committed
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.
1 parent da00ec0 commit 2fe4691

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jira/resources.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ def __getattr__(self, item: str) -> Any:
189189
Returns:
190190
Any: Attribute value.
191191
"""
192+
if item in ["raw"]:
193+
return self.__dict__[item]
192194
try:
193195
return self[item] # type: ignore
194196
except Exception as e:

0 commit comments

Comments
 (0)