mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-27 06:29:47 +00:00
fix
This commit is contained in:
@@ -54,6 +54,7 @@ python lerobot/scripts/visualize_dataset_html.py \
|
|||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import atexit
|
import atexit
|
||||||
|
import contextlib
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@@ -200,10 +201,8 @@ def run_react_app(
|
|||||||
process.wait(timeout=5)
|
process.wait(timeout=5)
|
||||||
except (ProcessLookupError, subprocess.TimeoutExpired):
|
except (ProcessLookupError, subprocess.TimeoutExpired):
|
||||||
# Force kill if graceful termination fails
|
# Force kill if graceful termination fails
|
||||||
try:
|
with contextlib.suppress(ProcessLookupError):
|
||||||
os.killpg(os.getpgid(process.pid), signal.SIGKILL)
|
os.killpg(os.getpgid(process.pid), signal.SIGKILL)
|
||||||
except ProcessLookupError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def signal_handler(sig, frame):
|
def signal_handler(sig, frame):
|
||||||
cleanup()
|
cleanup()
|
||||||
|
|||||||
Reference in New Issue
Block a user