CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
argparse.ArgumentError Class Reference
Inheritance diagram for argparse.ArgumentError:
Exception

Public Member Functions

def __init__ (self, argument, message)
 
def __str__ (self)
 

Public Attributes

 argument_name
 
 message
 

Detailed Description

An error from creating or using an argument (optional or positional).

The string value of this exception is the message, augmented with
information about the argument that caused it.

Definition at line 700 of file argparse.py.

Constructor & Destructor Documentation

def argparse.ArgumentError.__init__ (   self,
  argument,
  message 
)

Definition at line 707 of file argparse.py.

707  def __init__(self, argument, message):
709  self.message = message
710 
def __init__(self, argument, message)
Definition: argparse.py:707
def _get_action_name(argument)
Definition: argparse.py:687

Member Function Documentation

def argparse.ArgumentError.__str__ (   self)

Definition at line 711 of file argparse.py.

References argparse.ArgumentError.argument_name, python.rootplot.argparse.ArgumentError.argument_name, cmsPerfStripChart.dict, rrapi.RRApiError.message, util.rrapi.RRApiError.message, iniparser.ConfigData.message, cscdqm::Exception.message, DQMNet::QValue.message, argparse.ArgumentError.message, and python.rootplot.argparse.ArgumentError.message.

711  def __str__(self):
712  if self.argument_name is None:
713  format = '%(message)s'
714  else:
715  format = 'argument %(argument_name)s: %(message)s'
716  return format % dict(message=self.message,
717  argument_name=self.argument_name)
718 
719 # ==============
720 # Action classes
721 # ==============
722 

Member Data Documentation

argparse.ArgumentError.argument_name

Definition at line 708 of file argparse.py.

Referenced by argparse.ArgumentError.__str__().

argparse.ArgumentError.message

Definition at line 709 of file argparse.py.

Referenced by argparse.ArgumentError.__str__().