diff options
author | Daniil Baturin <daniil@baturin.org> | 2023-10-06 16:59:16 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2023-10-06 17:01:15 +0100 |
commit | ba5e5638c15914c0b1bb3d61942f64046b38efd6 (patch) | |
tree | 531e6d48abe552a8979d58e4ff20685e831b3332 | |
parent | bd727ffdd8975d60ba55b448fe194f99ec850008 (diff) | |
download | vyos-utils-ba5e5638c15914c0b1bb3d61942f64046b38efd6.tar.gz vyos-utils-ba5e5638c15914c0b1bb3d61942f64046b38efd6.zip |
numeric: T5638: Do not complain about range arguments in check_not_value when it's not necessary
(i.e., when no actual --not-value options are given)
-rw-r--r-- | src/numeric.ml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/numeric.ml b/src/numeric.ml index a3c5d11..f27c1ee 100644 --- a/src/numeric.ml +++ b/src/numeric.ml @@ -146,6 +146,7 @@ let check_not_ranges opts m = let check_not_values opts m = let excluded_values = List.map (number_of_string opts) opts.not_values in + if excluded_values = [] then () else match m with | Range_float _ -> Printf.ksprintf failwith "--not-value cannot be used with ranges" | Number_float num -> |