Message5718
The HTTPError exception returned by urllib2 in this circumstance is also a full response object. You should be able to use this object to close the connection. For example
try:
urllib2.urlopen("http://www.example.com/doesnotexist.html")
except HTTPError, he:
print "Error retrieving that URL: %s" % str(he)
he.close() |
|
Date |
User |
Action |
Args |
2010-04-16 16:38:14 | amak | set | messageid: <1271435894.28.0.563186410376.issue1544@psf.upfronthosting.co.za> |
2010-04-16 16:38:14 | amak | set | recipients:
+ amak, geraldth |
2010-04-16 16:38:13 | amak | link | issue1544 messages |
2010-04-16 16:38:13 | amak | create | |
|