[fix](cli): handle edge cases with empty NUMA nodes (#1929)

Co-authored-by: Andy18650 <114562805@qq.com>
This commit is contained in:
Andy18650 2026-04-13 16:45:41 +08:00 committed by GitHub
parent 279c920a69
commit f42e94a527
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -446,6 +446,9 @@ def _parse_cpu_flags(flags: list[str]) -> list[str]:
def _parse_cpu_list(cpulist: str) -> list[int]:
"""Parse CPU list string like '0-3,8-11' to list of CPU IDs."""
cpus = []
if cpulist == "":
# if there are no cpu cores for a specific numa node (for example, virtual numa on optane), return empty list
return cpus
for part in cpulist.split(","):
if "-" in part:
start, end = part.split("-")