summaryrefslogtreecommitdiff
path: root/src/validators
diff options
context:
space:
mode:
Diffstat (limited to 'src/validators')
-rwxr-xr-xsrc/validators/numeric6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/validators/numeric b/src/validators/numeric
index 0a2d83d14..2cd5178b9 100755
--- a/src/validators/numeric
+++ b/src/validators/numeric
@@ -19,7 +19,6 @@
import sys
import argparse
-import re
parser = argparse.ArgumentParser()
parser.add_argument("-f", "--float", action="store_true", help="Accept floating point values")
@@ -50,8 +49,9 @@ if args.range:
valid = False
for r in args.range:
try:
- lower, upper = re.match(r'(\d+)\s*\-\s*(\d+)', r).groups()
- lower, upper = int(lower), int(upper)
+ list = r.split('-')
+ lower = int(list[0])
+ upper = int(list[1])
except:
print("{0} is not a valid number range",format(args.range), file=sys.stderr)
sys.exit(1)