pycontribs / jira

Python Jira library. Development chat available on https://matrix.to/#/#pycontribs:matrix.org
https://jira.readthedocs.io
BSD 2-Clause "Simplified" License
1.95k stars 864 forks source link

Avoid infinite recursion in Resource.__getattr__ #1722

Open sparrowt opened 1 year ago

sparrowt commented 1 year ago

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.

Fixes: https://github.com/pycontribs/jira/issues/1721

I haven't added a test as it seems pretty niche but there is a repro test case on the issue linked above which we can incorporate if desired?

adehad commented 1 year ago

@sparrowt would be great if you can add that test case into: https://github.com/pycontribs/jira/blob/main/tests/test_client.py