Hi,

You described the PEP 3151 which has been implemented in Python 3.3:
https://www.python.org/dev/peps/pep-3151

In Python 3.3, socket.error is an alias to OSError. In Trollius, I'm using
wrap_error(), a function wrapping socket.error and generic OSError to
specific OSError like ConnectionResetError. It looks like I forgot to wrap
the call to bind in create_server().

Victor

Le lundi 14 juillet 2014, Luca Sbardella <[email protected]> a
écrit :

> Hi,
>
> When using the create_server method on an event loop, I want to catch the
> OSError when binding to an address already in use and log a message rather
> than the full stack trace.
>
> This works in asyncio, however trollius does not raise OSError, it raises
> socket.error instead.
> Not a big deal but any reason for this discrepancy or trollius should use
> OSError too?
>
> Luca
>

Reply via email to