title: How to skip a section in config file using configparser
body: <p>I have written a code where parameters are taken from a config file.
  My first parameter in the config is for setting the debug level.</p>
  
  <pre><code>    config = ConfigParser.RawConfigParser()
      config.read('config.cfg')
      log_level = config.get('Logger','log_level' )
  </code></pre>
  
  <p>There are other sections in the config which gives the server IP and password to scan each sections. </p>
  
  <p>Main Code:</p>
  
  <pre><code>for section in config.sections():
      components = dict() #start with empty dictionary for each section
      env.user = config.get(section, 'server.user_name')
      env.password = config.get(section, 'server.password')
      host = config.get(section, 'server.ip')
  </code></pre>
  
  <p>From my config</p>
  
  <pre><code>[Logger]
  #Possible values for logging are INFO, DEBUG and ERROR
  log_level = DEBUG
  
  [server1]
  server.user_name = root
  server.password = password
  server.ip = 172.19.41.21
  [server2]
  server.user_name = root
  server.password = password
  server.ip = 172.19.41.21
  </code></pre>
  
  <p>Now my code says to check each section to retrieve the username and password. Since the first section doesn't contain these values, it's failing. How can i check each section for username and password and if its not there just go to the next section. I tried by checking for NONE and go to the next section. But that code is ugly and it's failing. Something like this:</p>
  
  <pre><code>if env.user=='':
          next
  </code></pre>
  
  <p>Can someone help me to proceed further?</p>