Added option --no-hidraw for the case where hidraw=true is in a confi… #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a --no-hidraw option to negate hidraw=true if it's set in a config file.
The way the argument parser is set up, it's impossible to tell if an argument has been set explicitly by a user or not. This made it a bit difficult to set hidraw back to false on the command line if it was set to true in a config file. Reparsing the command line into a supplied namespace seemed to do the trick.
This problem still exists in the controllers parsing.
I usually get around this problem by explicitly finding and setting defaults somewhere outside of the argument parser. Having a default setter class which has values and defaults added to it alongside the parser might be a way to go. Ideas?