Message5718

Author amak
Recipients amak, geraldth
Date 2010-04-16.16:38:13
SpamBayes Score 0.042733278
Marked as misclassified No
Message-id <1271435894.28.0.563186410376.issue1544@psf.upfronthosting.co.za>
In-reply-to
Content
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()
History
Date User Action Args
2010-04-16 16:38:14amaksetmessageid: <1271435894.28.0.563186410376.issue1544@psf.upfronthosting.co.za>
2010-04-16 16:38:14amaksetrecipients: + amak, geraldth
2010-04-16 16:38:13amaklinkissue1544 messages
2010-04-16 16:38:13amakcreate