Commit 39ea1cb7 authored by Denis Bilenko's avatar Denis Bilenko

fix TypeError on Python 3.x

 Traceback (most recent call last):
    File "C:\projects\gevent\greentest\greentest.py", line 213, in wrapped
      return method(self, *args, **kwargs)
    File "C:\projects\gevent\greentest\greentest.py", line 202, in wrapped
      return method(self, *args, **kwargs)
    File "C:\projects\gevent\greentest\greentest.py", line 88, in wrapped
      return method(self, *args, **kwargs)
    File "C:\projects\gevent\greentest\test__server.py", line 267, in test_serve_forever
      self.assertConnectionRefused()
    File "C:\projects\gevent\greentest\test__server.py", line 114, in assertConnectionRefused
      conn = self.makefile()
    File "C:\projects\gevent\greentest\test__server.py", line 86, in makefile
      sock.connect((self.server.server_host, self.server.server_port))
    File "c:\projects\gevent\gevent\_socket3.py", line 261, in connect
      raise error(result, strerror(result))
    File "c:\projects\gevent\gevent\win32util.py", line 89, in formatError
      return self.winError(errorcode)[1]
  TypeError: 'OSError' object is not subscriptable
parent 2e313e9b
......@@ -86,7 +86,7 @@ class _ErrorFormatter(object):
@rtype: C{str}
"""
if self.winError is not None:
return self.winError(errorcode)[1]
return str(self.winError(errorcode))
if self.formatMessage is not None:
return self.formatMessage(errorcode)
if self.errorTab is not None:
......
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