Modify ↓
Ticket #232 (new defect)
Constructor.set_python_instance_state defect with object without __setstate__ function
| Reported by: | felix.antoine.fortin@… | Owned by: | xi |
|---|---|---|---|
| Priority: | normal | Component: | pyyaml |
| Severity: | normal | Keywords: | |
| Cc: |
Description
There is a bug in Constructor.set_python_instance_state, the last for loops of the function tries to set attribute on the object 'object' instead of the object 'instance'.
I stumbled on the bug when trying to load an object who had a getstate function but no setstate.
The patch is straightforward, just have to replace object on line 563, by instance.
Attachments
Change History
Changed 16 months ago by felix.antoine.fortin@…
-
attachment
pyyaml-constructor.diff
added
Note: See
TracTickets for help on using
tickets.

Patch for Constructor.set_python_instance_state