make sense: no negative numbers, and require an input of "-" instead
of "0" to indicate that the timestamp isn't being provided.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1595034 13f79535-47bb-0310-9956-
ffa450edef68
t = args.pop(0)
if t == '-':
return None
+ bad_val = False
+ val = None
try:
- return int(t)
+ val = int(t)
except ValueError:
+ bad_val = True
+
+ if bad_val or val < 1:
print >> sys.stderr, 'The timestamp "%s" is invalid' % t
sys.exit(1)
+ return val
+
def configure_public_key(cur, args):
record_id = record_id_arg(cur, args, False)