Add context to OcfCompletion
Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
parent
52962402fe
commit
e4b11b6933
@ -71,7 +71,7 @@ class OcfCompletion:
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
raise KeyError(f"No completion argument {key} specified")
|
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
|
Provide ctypes arg list, and optionally index of status argument in
|
||||||
completion function which will be extracted (default - last argument).
|
completion function which will be extracted (default - last argument).
|
||||||
@ -82,6 +82,7 @@ class OcfCompletion:
|
|||||||
self.e = Event()
|
self.e = Event()
|
||||||
self.results = OcfCompletion.CompletionResult(completion_args)
|
self.results = OcfCompletion.CompletionResult(completion_args)
|
||||||
self._as_parameter_ = self.callback
|
self._as_parameter_ = self.callback
|
||||||
|
self.context = context
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def callback(self):
|
def callback(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user