title: Handling urllib2's timeout? - Python
body: <p>I'm using the timeout parameter within the urllib2's urlopen.</p>
  
  <pre><code>urllib2.urlopen('http://www.example.org', timeout=1)
  </code></pre>
  
  <p>How do I tell Python that if the timeout expires a custom error should be raised?</p>
  
  <hr>
  
  <p>Any ideas?</p>