From: Perry Gagne <pgagne(a)redhat.com>
Had to exclude args since they might contain Device objects (ex. when creating a team
device)
I have a couple ideas for a more thorough approch here, but whated to commit this right
away to unblock
testing since it might cause beaker jobs to fail.
Signed-off-by: Perry Gagne <pgagne(a)redhat.com>
---
lnst/Controller/RecipeResults.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lnst/Controller/RecipeResults.py b/lnst/Controller/RecipeResults.py
index 941ea8d..c2e2c3e 100644
--- a/lnst/Controller/RecipeResults.py
+++ b/lnst/Controller/RecipeResults.py
@@ -183,6 +183,11 @@ class DeviceMethodCallResult(DeviceConfigResult):
),
)
+ def __getstate__(self):
+ state = super(DeviceMethodCallResult, self).__getstate__()
+ # Remove things that can't be pickled
+ state['_args'] = None # Could be device object (ex. port of team
device).
+ return state
class DeviceAttrSetResult(DeviceConfigResult):
def __init__(self, success, device, attr_name, value, old_value):
--
2.26.2
Show replies by thread