https://github.com/python/cpython/commit/d1af4f53720d252326ae9c91c93495b58e0b4922 commit: d1af4f53720d252326ae9c91c93495b58e0b4922 branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: kumaraditya303 <[email protected]> date: 2024-07-25T12:20:40Z summary:
[3.13] gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` (GH-122269) (#122278) gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` (GH-122269) (cherry picked from commit 070f1e2e5b9b31ee3e7a1af2e30d7e3a66040b17) Co-authored-by: AN Long <[email protected]> files: M Lib/asyncio/base_events.py diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index f0e690b61a73dd..e4a39f4d345c79 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -1028,8 +1028,7 @@ async def _connect_sock(self, exceptions, addr_info, local_addr_infos=None): except OSError as exc: msg = ( f'error while attempting to bind on ' - f'address {laddr!r}: ' - f'{exc.strerror.lower()}' + f'address {laddr!r}: {str(exc).lower()}' ) exc = OSError(exc.errno, msg) my_exceptions.append(exc) @@ -1599,7 +1598,7 @@ async def create_server( except OSError as err: msg = ('error while attempting ' 'to bind on address %r: %s' - % (sa, err.strerror.lower())) + % (sa, str(err).lower())) if err.errno == errno.EADDRNOTAVAIL: # Assume the family is not enabled (bpo-30945) sockets.pop() _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
