1 parent 297ade8 commit e222ad7Copy full SHA for e222ad7
1 file changed
cli4/cli4.py
@@ -119,6 +119,8 @@ def cli4(args):
119
elif opt in ('-D', '--delete'):
120
method = 'DELETE'
121
122
+ digits_only = re.compile('^[0-9]+$')
123
+
124
# next grab the params. These are in the form of tag=value
125
params = {}
126
while len(args) > 0 and '=' in args[0]:
@@ -127,8 +129,8 @@ def cli4(args):
127
129
value = True
128
130
elif value == 'false':
131
value = False
- # elif value.isdigit():
- # value = int(value)
132
+ elif digits_only.match(value):
133
+ value = int(value)
134
elif value[0] is '[' and value[-1] is ']':
135
value = value[1:-1].split(',')
136
params[tag] = value
0 commit comments