1. cherrypy
  2. CherryPy
Issue #1114 resolved

Got socket_errors_to_ignore on Windows when using SSL

Anonymous created an issue

Got an AttributeError: 'module' object has no attribute 'socket_errors_to_ignore' at cherrypy\wsgiserver\ssl_pyopenssl.py", line 75, in _safe_call

on a windows 7 machine running under python 2.7

Error is apparently caused by socket_errors_to_ignore being absent from the all list in cherrypy\wsgiserver\wsgiserver2.py. As a result in cherrypy\wsgiserver__init__.py

from wsgiserver2 import *

fails to import 'socket_errors_to_ignore'

We patched the code by adding socket_errors_to_ignore. Hopefully that is the correct fix.

Comments (5)

  1. Taneli Taira

    Actually, this wasn't resolved in the mentioned changeset. This was probably introduced there. Module wsgiserver does not list socket_errors_to_ignore, so it is not an object of the wsgiserver module. Yet it is used from ssl_pyopenssl.py like it was. There are two very simple options to fix this:

    1) In cherrypy\wsgiserver\ssl_pyopenssl.py line 75 use wsgiserver.wsgiserver2.socket_errors_to_ignore instead of wsgiserver.socket_errors_to_ignore

    2) In cherrypy\wsgiserver\wsgiserver2.py line 71 add socket_errors_to_ignore into the all list.

  2. Log in to comment