Issue #1178 duplicate

[Python3.3] [cherrypy-3.2.2] Change in python3.3 OS and IO exception hierarchy breaking server startup

Anonymous created an issue

As stated in the link above, IOError and socket.error are changed as aliases to the OSError.

In effect it breaks the function check_port(host, port, timeout=1.0) in cherrypy/process/, at the try-except block.

raise IOError("Port %s is in use on %s; perhaps the previous "
                          "httpserver did not shut down properly." %
                          (repr(port), repr(host)))

will be caught by the following except clause under Python3.3:

except socket.error:
            if s:

which in python3.2 should be raised to the caller instead.

The result is the start listener will fail with IOError('Port %r not bound on %r" % (port, host)) even when port is in fact bound on host.

Comments (3)

  1. Log in to comment