Commit 9fb98c26 authored by Denis Bilenko's avatar Denis Bilenko

test__http.py: fix error in test

parent 810040cc
......@@ -5,6 +5,7 @@ import greentest
import os
from urllib2 import urlopen, URLError, HTTPError
import socket
import errno
# add test for "chunked POST input -> chunked output"
......@@ -56,8 +57,8 @@ class BoundTestCase(greentest.TestCase):
def check_refused(self):
try:
self.connect()
except socket.error, e:
if 'ECONNREFUSED' not in str(e):
except socket.error, ex:
if ex[0] != errno.ECONNREFUSED:
raise
except IOError, e:
print 'WARNING: instead of ECONNREFUSED got IOError: %s' % e
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment