diff --git a/src/PVE/CpuSet.pm b/src/PVE/CpuSet.pm index 7293d9b..483405e 100644 --- a/src/PVE/CpuSet.pm +++ b/src/PVE/CpuSet.pm @@ -164,7 +164,11 @@ sub short_string { $next = $cpu; } else { $res .= ',' if length($res); - $res .= "$last-$next"; + if ($last != $next) { + $res .= "$last-$next"; + } else { + $res .= "$last"; + } $last = $next = $cpu; } }