Skip to content

Commit f24a989

Browse files
committed
fix 37
1 parent 106b57a commit f24a989

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

ipykernel/kernelbase.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,21 +1142,19 @@ async def _progressively_terminate_all_children(self):
11421142

11431143
pgid = os.getpgid(os.getpid())
11441144
if not pgid:
1145-
self.log.warning(f"No Pgid ({pgid=}), not trying to stop subprocesses.")
1145+
self.log.warning(f"No Pgid ({pgid}), not trying to stop subprocesses.")
11461146
return
11471147
if psutil is None:
11481148
# blindly send quickly sigterm/sigkill to processes if psutil not there.
1149-
self.log.warning(
1150-
f"Please install psutil for a cleaner subprocess shutdown."
1151-
)
1149+
self.log.debug("Please install psutil for a cleaner subprocess shutdown.")
11521150
self._send_interupt_children()
11531151
try:
11541152
await asyncio.sleep(0.05)
1155-
self.log.debug("Sending SIGTERM to {pgid=}")
1153+
self.log.debug("Sending SIGTERM to {pgid}")
11561154
os.killpg(pgid, SIGTERM)
11571155
if sys.platform != "win32":
11581156
await asyncio.sleep(0.05)
1159-
self.log.debug("Sending SIGKILL to {pgid=}")
1157+
self.log.debug("Sending SIGKILL to {pgid}")
11601158
os.killpg(pgid, SIGKILL)
11611159
except Exception:
11621160
self.log.exception("Exception during subprocesses termination")
@@ -1167,7 +1165,7 @@ async def _progressively_terminate_all_children(self):
11671165
if not children:
11681166
self.log.debug("Kernel has no children.")
11691167
return
1170-
self.log.debug(f"Trying to interrupt then kill subprocesses : {children=}")
1168+
self.log.debug(f"Trying to interrupt then kill subprocesses : {children}")
11711169
self._send_interupt_children()
11721170
if sys.platform != "win32":
11731171
sigs = (SIGTERM, SIGKILL)

0 commit comments

Comments
 (0)