MCPcopy Index your code
hub / github.com/cirosantilli/linux-kernel-module-cheat / __call__

Method __call__

common.py:396–409  ·  view source on GitHub ↗

For Python code calls, in addition to base: - print the CLI equivalent of the call - automatically forward common arguments

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

394 self._is_common = False
395
396 def __call__(self, *args, **kwargs):
397 '''
398 For Python code calls, in addition to base:
399
400 - print the CLI equivalent of the call
401 - automatically forward common arguments
402 '''
403 print_cmd = ['./' + self.extra_config_params, LF]
404 for line in self.get_cli(**kwargs):
405 print_cmd.extend(line)
406 print_cmd.append(LF)
407 if not ('quiet' in kwargs and kwargs['quiet']):
408 shell_helpers.ShellHelpers().print_cmd(print_cmd)
409 return super().__call__(**kwargs)
410
411 def _init_env(self, env):
412 '''

Callers

nothing calls this directly

Calls 2

get_cliMethod · 0.80
print_cmdMethod · 0.80

Tested by

no test coverage detected