summaryrefslogtreecommitdiff
path: root/src/mailman/bin/docs/master.rst
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/bin/docs/master.rst')
-rw-r--r--src/mailman/bin/docs/master.rst9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mailman/bin/docs/master.rst b/src/mailman/bin/docs/master.rst
index 5a3a94da6..c9bd60f13 100644
--- a/src/mailman/bin/docs/master.rst
+++ b/src/mailman/bin/docs/master.rst
@@ -41,13 +41,8 @@ runner processes.
None of the children are running now.
>>> import errno
+ >>> from contextlib import suppress
>>> for pid in master.runner_pids:
- ... try:
+ ... with suppress(ProcessLookupError):
... os.kill(pid, 0)
... print('Process did not exit:', pid)
- ... except OSError as error:
- ... if error.errno == errno.ESRCH:
- ... # The child process exited.
- ... pass
- ... else:
- ... raise