getOptionParser(): Check -s option's value -> reasonable error message.
authorPascal Volk <user@localhost.localdomain.org>
Sun, 11 Apr 2010 19:16:28 +0000
changeset 10 07b9fe5c6fcf
parent 9 3a392067015c
child 11 a5f5a8f288da
getOptionParser(): Check -s option's value -> reasonable error message.
nixspamsum
--- a/nixspamsum	Sun Apr 11 19:00:44 2010 +0000
+++ b/nixspamsum	Sun Apr 11 19:16:28 2010 +0000
@@ -84,6 +84,7 @@
     parser.add_option('-p', action='store_true', dest='percent', default=False,
             help='show also percentages in table output [default: %default]')
     parser.add_option('-s', dest='order', default='name', metavar='SORTBY',
+            choices=('count', 'name'),
             help='arrange output by: name or count [default: %default]')
     parser.add_option('-t', dest='format', default='postfix',metavar='MTA',
             choices=('postfix',),