Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion wmi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ def invoke_method(self, target, method_name, *args, **kwargs):
params = self._get_method_params(target, method_name)
operation_options = self._get_mi_operation_options(
operation_options=kwargs.pop('operation_options', None))
keep_bool_ret_vals = kwargs.pop('keep_bool_ret_vals', False)

for i, v in enumerate(args):
_, el_type, _ = params.get_element(i)
Expand Down Expand Up @@ -710,7 +711,8 @@ def invoke_method(self, target, method_name, *args, **kwargs):
# returns void, as there's no direct way to determine it.
# This won't work if the method is expected to return a
# boolean value!!
if element != ('ReturnValue', mi.MI_BOOLEAN, True):
if (element != ('ReturnValue', mi.MI_BOOLEAN, True)
or keep_bool_ret_vals):
l.append(self._wrap_element(*element))
return tuple(l)

Expand Down