sshmitm.moduleparser.baseparser module

class sshmitm.moduleparser.baseparser.AddArgumentMethod(*, parser, container=None, config_section=None)

Bases: object

Parameters:
  • parser (BaseModuleArgumentParser) –

  • container (Optional[_ActionsContainer], default: None) –

  • config_section (Optional[str], default: None) –

class sshmitm.moduleparser.baseparser.BaseModuleArgumentParser(*args, config=None, **kwargs)

Bases: ArgumentParser

Enhanced ArgumentParser to suppress warnings and error during module parsing

Parameters:
  • args (Any) –

  • config (Optional[ConfigParser], default: None) –

  • kwargs (Any) –

ARGCONF = None
add_argument_group(*args, **kwargs)
Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

_ArgumentGroup

error(message)

Prints a usage message incorporating the message to stderr and exits.

If you override this in a subclass, it should not return – it should either exit or raise an exception.

Parameters:

message (str) –

Return type:

None