From: Greg W. <gw...@us...> - 2002-06-21 20:15:08
|
Update of /cvsroot/optik/optik/lib In directory usw-pr-cvs1:/tmp/cvs-serv9785/lib Modified Files: option.py Log Message: Tweak error message generated by check_choice(). Index: option.py =================================================================== RCS file: /cvsroot/optik/optik/lib/option.py,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- option.py 21 Jun 2002 20:11:41 -0000 1.18 +++ option.py 21 Jun 2002 20:15:05 -0000 1.19 @@ -32,9 +32,10 @@ if value in option.choices: return value else: + choices = ", ".join(map(repr, option.choices)) raise OptionValueError( - "option %s: invalid choice: %r (choose one of %r)" - % (opt, value, option.choices)) + "option %s: invalid choice: %r (choose from %s)" + % (opt, value, choices)) # Not supplying a default is different from a default of None, # so we need an explicit "not supplied" value. |