Belle II Software  release-08-01-10
DefaultHelpArgumentParser Class Reference
Inheritance diagram for DefaultHelpArgumentParser:
Collaboration diagram for DefaultHelpArgumentParser:

Public Member Functions

def error (self, message)
 

Detailed Description

An argparse.Argument parse slightly changed such
that it always prints an extended help message incase of a parsing error.

Definition at line 16 of file utilities.py.

Member Function Documentation

◆ error()

def error (   self,
  message 
)
Method invoked when a parsing error occured.
Writes an extended help over the base ArgumentParser.

Definition at line 21 of file utilities.py.

21  def error(self, message):
22  """Method invoked when a parsing error occured.
23  Writes an extended help over the base ArgumentParser.
24  """
25  self.print_help()
26  sys.stderr.write('error: %s\n' % message)
27  sys.exit(2)
28 
29 

The documentation for this class was generated from the following file: