mirror of
https://github.com/Gallopsled/pwntools.git
synced 2026-10-12 02:02:27 +00:00
* fix: improve exception handling in process.py and adb.py - process.py: restore bare except with pylint disable (intentional: catches non-Exception errors during Python interpreter shutdown) - adb.py: use specific (OSError, EOFError) instead of broad except Exception * fix: add missing import for remote in adb.py The bare except was silently catching NameError from the missing remote import. Added 'from pwnlib.tubes.remote import remote' to fix the actual underlying bug. * docs: add changelog entry for PR #2743 * docs: move changelog reference link near 5.0.0 release section * fix: catch PwnlibException in emulator AVD name lookup The bare except was catching PwnlibException raised by remote() when connection fails. Replacing with except (OSError, EOFError) caused PwnlibException to propagate, potentially causing retry loops in Android CI. Fix by adding PwnlibException to the exception tuple. * fix: prevent __getattr__ infinite recursion with context.device setter When context.device setter accesses device.arch, it triggers AdbDevice's __getattr__ (instead of the arch property). __getattr__ then calls context.local(device=self), which triggers the setter again, causing infinite recursion. Fix: check if the attribute exists on the class via MRO.__dict__ before entering the context.local() path. This lets Python's normal property resolution handle class-defined attributes. * revert: remove __getattr__ MRO guard Peace-maker correctly points out that __getattr__ is only called when normal attribute lookup fails, so the MRO guard is unnecessary. The infinite recursion is a pre-existing bug unrelated to this PR. * Assign to `_avd` instead of `avd` --------- Co-authored-by: mshzy <[email protected]> Co-authored-by: peace-maker <[email protected]>