Modify

Ticket #232 (new defect)

Opened 2 years ago

Last modified 44 years ago

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

pyyaml-constructor.diff Download (455 bytes) - added by felix.antoine.fortin@… 2 years ago.
Patch for Constructor.set_python_instance_state

Change History

Changed 2 years ago by felix.antoine.fortin@…

Patch for Constructor.set_python_instance_state

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from xi. Next status will be 'new'
The owner will be changed from xi to anonymous. Next status will be 'assigned'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.