title: Though the exception is caught in the config parser the error traceback is shown in python
body: <p>I am fetching the values from the configfile. To make sure my program handles any exceptions that can occur I have my config read operation in try except block as follow:</p>
  
  <pre><code>def __getConfigDetails(self):
          try:
              self.username = config.get("plugin_haproxy", 'user')
              self.hostname = config.get("plugin_haproxy", 'host')
              self.filelocation = config.get("plugin_haproxy", 'filepath')
  
          except ConfigParser.NoOptionError as error:
              logging.error(error)
              print "Error in options Name", error
          except ConfigParser.NoSectionError as error:
              logging.error(error)
              print "Error in sections Name", error
  </code></pre>
  
  <p>After getting the details with this I am calling another function which needs the above value as an arguments. We know that the one of the value will of course not be available but how do we handle such situations,Why is the exceptions not handling it</p>
  
  <pre><code>self.executeCommand(self.username, self.hostname, self.filelocation)
  </code></pre>
  
  <p>The program works great but Suppose if the user changed the options in config file and changed <strong>user to username</strong> Of course the method is suppose to handle it since we are handling <strong>ConfigParser.NoOptionError</strong> exception.</p>
  
  <p>Here,in my program it is throwing the exceptions BUT also throwing the error traceback as below,</p>
  
  <pre><code>Traceback (most recent call last):
    File "main.py", line 67, in &lt;module&gt;
      main()
    File "main.py", line 59, in main
      cons.PLUGIN_CONFIG_PATH, finaloutput, finallogs)
    File "/home/tara/taraproject/checkaccessEnv/project2/plugins/plugin_haproxy/plugin_haproxy.py", line 51, in run
      self.__getConfigDetails()
    File "/home/tara/taraproject/checkaccessEnv/project2/plugins/plugin_haproxy/plugin_haproxy.py", line 23, in __getConfigDetails
      self.username = config.get("plugin_haproxy", 'user')
    File "/usr/lib/python2.7/ConfigParser.py", line 340, in get
      raise NoOptionError(option, section)
  ConfigParser.NoOptionError: No option 'user' in section: 'plugin_haproxy'
  </code></pre>
  
  <p>I just want the exceptions print to be displayed,Why is it so ?</p>
  
  <blockquote>
    <p>I know I can handle this situations by using if clause on
    secondfunction ie, __executeCommand to make sure if it runs than only
    move further but this might not be the solution since I have
    exceptions doing the work forhead, What is the best way to solve such
    problem</p>
  </blockquote>