mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-43989: Add signal format specifier for unix_events (GH-25769)
Add format specifier for IntEnum references to avoid 3.12 deprecation warning.
This commit is contained in:
parent
a5669b3c62
commit
55e5c680dd
1 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
|
|||
logger.info('set_wakeup_fd(-1) failed: %s', nexc)
|
||||
|
||||
if exc.errno == errno.EINVAL:
|
||||
raise RuntimeError(f'sig {sig} cannot be caught')
|
||||
raise RuntimeError(f'sig {sig:d} cannot be caught')
|
||||
else:
|
||||
raise
|
||||
|
||||
|
@ -160,7 +160,7 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
|
|||
signal.signal(sig, handler)
|
||||
except OSError as exc:
|
||||
if exc.errno == errno.EINVAL:
|
||||
raise RuntimeError(f'sig {sig} cannot be caught')
|
||||
raise RuntimeError(f'sig {sig:d} cannot be caught')
|
||||
else:
|
||||
raise
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue