diff --git a/src/sage/combinat/designs/covering_array.py b/src/sage/combinat/designs/covering_array.py index 43a7a846757..9582a627d22 100644 --- a/src/sage/combinat/designs/covering_array.py +++ b/src/sage/combinat/designs/covering_array.py @@ -88,11 +88,10 @@ def truncate_columns(array, k): if oldk == k: return array - elif oldk < k: + if oldk < k: raise ValueError("array only has {} columns".format(oldk)) - else: - return [row[:k] for row in array] + return [row[:k] for row in array] def Kleitman_Spencer_Katona(N):