title: How to know if urllib.urlretrieve succeeds?
body: <p><code>urllib.urlretrieve</code> returns silently even if the file doesn't exist on the remote http server, it just saves a html page to the named file. For example:</p>
  
  <pre><code>urllib.urlretrieve('http://google.com/abc.jpg', 'abc.jpg')
  </code></pre>
  
  <p>just returns silently, even if abc.jpg doesn't exist on google.com server, the generated <code>abc.jpg</code> is not a valid jpg file, it's actually a html page . I guess the returned headers (a httplib.HTTPMessage instance) can be used to actually tell whether the retrieval successes or not, but I can't find any doc for <code>httplib.HTTPMessage</code>.</p>
  
  <p>Can anybody provide some information about this problem?</p>