Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: my_reviews.py

Issue 194753007: Validate input dates in my_reviews.py. (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: my_reviews.py
===================================================================
--- my_reviews.py (revision 256290)
+++ my_reviews.py (working copy)
@@ -342,6 +342,14 @@
options.end = end
print >> sys.stderr, 'Using range %s to %s' % (
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:
print_count(
options.reviewer,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698