Message6324

Author pekka.klarck
Recipients basti1302, pekka.klarck
Date 2011-01-15.10:58:37
SpamBayes Score 0.0052747005
Marked as misclassified No
Message-id <1295089118.2.0.724744253893.issue1697@psf.upfronthosting.co.za>
In-reply-to
Content
Due to this bug, code trying to handle connection problems by catching socket.error doesn't work because AssertionError is risen instead. An example code affected by this problem is below:

while time.time() < MAX_TIME:
    try:
        conn = httplib.HTTPConnection('localhost', 8080)
    except socket.error:
        time.sleep(2)

In our code we worked around this by replacing `except socket.error` with `except (socket.error, AssertionError)`.
History
Date User Action Args
2011-01-15 10:58:38pekka.klarcksetmessageid: <1295089118.2.0.724744253893.issue1697@psf.upfronthosting.co.za>
2011-01-15 10:58:38pekka.klarcksetrecipients: + pekka.klarck, basti1302
2011-01-15 10:58:38pekka.klarcklinkissue1697 messages
2011-01-15 10:58:37pekka.klarckcreate