Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added option --no-hidraw for the case where hidraw=true is in a confi… #77

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

poconbhui
Copy link
Contributor

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?

…g file but you want to turn it off on the command line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant