ralphbean / taskw

python taskwarrior api
http://threebean.org
GNU General Public License v3.0
176 stars 47 forks source link

Closes ralphbean/bugwarrior#729 #132

Closed Will-Shanks closed 4 years ago

Will-Shanks commented 4 years ago

Improves error message when user sets service.default_priority incorrectly by printing the valid config options

Instead of giving the error message ValueError: 'None' is not a valid choice; choices: [None, 'H', 'M', 'L'] Gives error ValueError: 'None' is not a valid choice; choices: ['', 'H', 'M', 'L']

None is not a valid config option, rather it represents the config option '' so '' should be included in the error message not None

ryneeverett commented 4 years ago

Sorry but it actually just occurred to me that this probably wont work after all. While this makes sense in the context of bugwarrior, it doesn't make sense to other taskw use cases where people actually need to pass None.