title: Is socket error handling different in python 2.5 than 2.7?
body: <p>Below is a code snip with error trace of a python scripted windows service I am running. It seems to work fine in python 2.7 on windows xp but the production machine I am using runs python 2.5 on windows server 2003. The main error I am having is <code>'error' object has no attribute 'errno'</code> Am I doing something that is fundamentally wrong for python 2.5 that works for 2.7?</p>
  
  <p><strong>Code Snip:</strong></p>
  
  <pre><code>try:
       if s == None:
            s = self.connect()
       char = s.recv(1)
       line += char
  
  except socket.timeout:
      if s != None:
          s.close()
      s = None
      continue
  
  except socket.error, socket_error:
      servicemanager.LogErrorMsg(traceback.format_exc())
  
      if socket_error.errno == errno.ECONNREFUSED:
          if s != None:
              s.close()
          time.sleep(60)
  
          s =None                    
          continue
  
      else:
          if s != None:
              s.close()
          os._exit(-1)
  
  else:
      pass
  </code></pre>
  
  <p><strong>Error Trace Snip:</strong></p>
  
  <pre><code>if socket_error.errno == errno.ECONNREFUSED:
  AttributeError: 'error' object has no attribute 'errno' 
  %2: %3
  </code></pre>