Skip to content

Commit 5d6406c

Browse files
committed
use f-string and args = [x, *y, z]
1 parent 54008b1 commit 5d6406c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Lib/multiprocessing/resource_tracker.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,12 @@ def _launch(self):
167167
fds_to_pass.append(r)
168168
# process will out live us, so no need to wait on pid
169169
exe = spawn.get_executable()
170-
args = [exe] + util._args_from_interpreter_flags()
171-
args += ['-c', cmd % r]
170+
args = [
171+
exe,
172+
*util._args_from_interpreter_flags(),
173+
'-c',
174+
f'from multiprocessing.resource_tracker import main;main({r})',
175+
]
172176
# bpo-33613: Register a signal mask that will block the signals.
173177
# This signal mask will be inherited by the child that is going
174178
# to be spawned and will protect the child from a race condition

0 commit comments

Comments
 (0)