Skip to content

Comments

[FIX] _revert_method: ensure origin method is set only if it exists#1580

Open
rov-adhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-110463-rov
Open

[FIX] _revert_method: ensure origin method is set only if it exists#1580
rov-adhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-110463-rov

Conversation

@rov-adhoc
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 19, 2026 12:15
@roboadhoc
Copy link
Contributor

Pull request status dashboard

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Este PR corrige el hook de desinstalación para que _revert_method() solo intente restaurar el método original cuando el método actual realmente expone el atributo origin, evitando fallos si el monkey patch no se aplicó (o si el método ya fue restaurado).

Changes:

  • Ajuste defensivo en _revert_method() para leer method.origin de forma segura con getattr(..., None).
  • Evita AttributeError al desinstalar cuando el método no fue parcheado.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants