From e4b11b6933cf7d9107c50e4d2d312e8a267b9db2 Mon Sep 17 00:00:00 2001 From: Jan Musial Date: Tue, 7 Apr 2020 16:09:27 +0200 Subject: [PATCH] Add context to OcfCompletion Signed-off-by: Jan Musial --- tests/functional/pyocf/types/shared.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/functional/pyocf/types/shared.py b/tests/functional/pyocf/types/shared.py index 70d7f49..0d5d622 100644 --- a/tests/functional/pyocf/types/shared.py +++ b/tests/functional/pyocf/types/shared.py @@ -71,7 +71,7 @@ class OcfCompletion: except KeyError: raise KeyError(f"No completion argument {key} specified") - def __init__(self, completion_args: list): + def __init__(self, completion_args: list, context=None): """ Provide ctypes arg list, and optionally index of status argument in completion function which will be extracted (default - last argument). @@ -82,6 +82,7 @@ class OcfCompletion: self.e = Event() self.results = OcfCompletion.CompletionResult(completion_args) self._as_parameter_ = self.callback + self.context = context @property def callback(self):