mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-33332: Add signal.valid_signals() (GH-6581)
This commit is contained in:
parent
491bbedc20
commit
9d3627e311
14 changed files with 171 additions and 26 deletions
|
|
@ -167,8 +167,8 @@ class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop):
|
|||
if not isinstance(sig, int):
|
||||
raise TypeError(f'sig must be an int, not {sig!r}')
|
||||
|
||||
if not (1 <= sig < signal.NSIG):
|
||||
raise ValueError(f'sig {sig} out of range(1, {signal.NSIG})')
|
||||
if sig not in signal.valid_signals():
|
||||
raise ValueError(f'invalid signal number {sig}')
|
||||
|
||||
def _make_read_pipe_transport(self, pipe, protocol, waiter=None,
|
||||
extra=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue