Chromium Code Reviews| Index: my_reviews.py |
| =================================================================== |
| --- my_reviews.py (revision 256001) |
| +++ my_reviews.py (working copy) |
| @@ -342,6 +342,15 @@ |
| 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, e: |
| + print 'Error: %s: %s - %s' % (e, options.begin, options.end) |
|
M-A Ruel
2014/03/11 19:34:06
Use parser.error() instead. No need to return, sin
Lei Zhang
2014/03/11 19:42:21
Done.
|
| + return 1 |
| + |
| if options.count: |
| print_count( |
| options.reviewer, |