Commit beb54c9
committed
Fix ListProxy handling in _remove_circular_refs
The _remove_circular_refs function in salt.utils.data was trying to
reconstruct ListProxy objects by calling type(ob)(), but ListProxy.__init__
requires 3 arguments (target, parent_optsdict, key).
When grains data is processed with salt.utils.data.decode(), it calls
_remove_circular_refs which failed on ListProxy objects with:
TypeError: ListProxy.__init__() missing 2 required positional arguments
Fixed by detecting ListProxy and converting to a regular list, consistent
with ListProxy.__deepcopy__() and __reduce_ex__() behavior.
Fixes: tests/pytests/scenarios/failover/multimaster/test_failover_master.py::test_minion_reconnection1 parent f327e03 commit beb54c9
1 file changed
+9
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
200 | 208 | | |
201 | 209 | | |
202 | 210 | | |
| |||
0 commit comments