From 33fffefd1d39ac20cf9a296dfe667b3520a1ee6b Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sun, 11 Sep 2022 09:18:38 +0200 Subject: [PATCH] Minor changes --- esds/helpers/platform.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esds/helpers/platform.py b/esds/helpers/platform.py index 7112ebc..fdbf29e 100644 --- a/esds/helpers/platform.py +++ b/esds/helpers/platform.py @@ -11,7 +11,8 @@ class UnitsParser: if len(elt) == 2: min = int(elt[0]) max = int(elt[1]) - # TODO: Check min/max + if min < 0 or max > limit: + raise Exception("Outside of range limit [0-"+str(limit)+"]") return(range(min,max)) else: return(list(map(int, r.split(","))))