Skip to content

Commit 42e8eb1

Browse files
committed
Simplify comments and exception note message
Remove unnecessary comment and simplify the exception note to just say 'Check stderr.' instead of the more verbose message.
1 parent 622345d commit 42e8eb1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Lib/multiprocessing/forkserver.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,11 @@ def connect_to_new_process(self, fds):
120120
connection.deliver_challenge(
121121
wrapped_client, self._forkserver_authkey)
122122
except (EOFError, ConnectionError, BrokenPipeError) as exc:
123-
# Add helpful context if forkserver likely crashed during preload
124123
if (self._preload_modules and
125124
self._preload_on_error == 'fail'):
126125
exc.add_note(
127126
"Forkserver process may have crashed during module "
128-
"preloading. Check stderr for ImportError traceback."
127+
"preloading. Check stderr."
129128
)
130129
raise
131130
finally:
@@ -261,7 +260,6 @@ def _handle_preload(preload, main_path=None, sys_path=None, on_error='ignore'):
261260
try:
262261
__import__(modname)
263262
except ImportError as e:
264-
# Only catch ImportError for regular module imports
265263
match on_error:
266264
case 'fail':
267265
raise

0 commit comments

Comments
 (0)