Commit 16c319dd authored by thestig@chromium.org's avatar thestig@chromium.org

Validate input dates in my_reviews.py.

Review URL: https://codereview.chromium.org/194753007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256292 0039d316-1c4b-4281-b951-d872f2087c98
parent 44202a28
...@@ -342,6 +342,14 @@ def main(): ...@@ -342,6 +342,14 @@ def main():
options.end = end options.end = end
print >> sys.stderr, 'Using range %s to %s' % ( print >> sys.stderr, 'Using range %s to %s' % (
options.begin, options.end) options.begin, options.end)
# Validate dates.
try:
to_datetime(options.begin)
to_datetime(options.end)
except ValueError as e:
parser.error('%s: %s - %s' % (e, options.begin, options.end))
if options.count: if options.count:
print_count( print_count(
options.reviewer, options.reviewer,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment