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

Fix for bug #12: Config reading is failing when an option is missing. #13

Closed
wants to merge 1 commit into from
Closed

Conversation

j-bennet
Copy link
Contributor

No description provided.

@amjith
Copy link
Member

amjith commented Dec 30, 2014

This doesn't fix the issue if someone has removed the smart-completion option from the file.

I also think it can be quite cumbersome in the future to do this check for every option.

I think SafeConfigParser() constructor takes a defaults param where you can specify the defaults for all the options.

That might be a better approach. So see if you can write a helper method that reads the default pgclirc file in the project directory and populate the defaults and then overlay the values from the actual config file .pgclirc.

Feel free to refactor (or remove completely) the helpers in config.py if you think they're too crude or cumbersome.

@j-bennet
Copy link
Contributor Author

Ah ok.
On 30 Dec 2014 14:57, "Amjith Ramanujam" notifications@github.com wrote:

This doesn't fix the issue if someone has removed the smart-completion
option from the file.

I also think it can be quite cumbersome in the future to do this check for
every option.

I think SafeConfigParser() constructor takes a defaults param where you
can specify the defaults for all the options.

That might be a better approach. So see if you can write a helper method
that reads the default pgclirc file in the project directory and populate
the defaults and then overlay the values from the actual config file
.pgclirc.

Feel free to refactor (or remove completely) the helpers in config.py if
you think they're too crude or cumbersome.


Reply to this email directly or view it on GitHub
#13 (comment).

@j-bennet j-bennet closed this Dec 30, 2014
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.

2 participants