Skip to content

Commit 7ad114f

Browse files
committed
move sys.path setting up per review.
1 parent 702e0b7 commit 7ad114f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/multiprocessing/forkserver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,14 @@ def ensure_running(self):
168168
def main(listener_fd, alive_r, preload, main_path=None, sys_path=None):
169169
'''Run forkserver.'''
170170
if preload:
171+
if sys_path is not None:
172+
sys.path[:] = sys_path
171173
if '__main__' in preload and main_path is not None:
172174
process.current_process()._inheriting = True
173175
try:
174176
spawn.import_main_path(main_path)
175177
finally:
176178
del process.current_process()._inheriting
177-
if sys_path is not None:
178-
sys.path[:] = sys_path
179179
for modname in preload:
180180
try:
181181
__import__(modname)

0 commit comments

Comments
 (0)