fix: handle partial objects in wait_for_predicate timeout message#795
fix: handle partial objects in wait_for_predicate timeout message#795nkatha23 wants to merge 1 commit intobitcoin-dev-project:mainfrom
Conversation
inspect.getsource() cannot handle functools.partial objects, causing a TypeError that masks the original timeout error. Fall back to repr() if getsource fails.
|
Hi there and sorry for the long delay. I'm looking in to this but what I think makes more sense is just removing |
Thanks for looking into it. That makes total sense. removing the partial entirely is cleaner than patching the error handling around it. I'll close this PR since #803 addresses the root cause. Looking forward to seeing the onion address work rebased on top |
Found this while investigating a CI failure on PR #791. plugin_test was timing out, but instead of seeing the real timeout error, CI was throwing a confusing TypeError because inspect.getsource() doesn't support functools.partial objects. This fix makes the error reporting robust by falling back to repr() when getsource() fails, so the actual timeout reason is visible instead of a misleading TypeError.