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

Some settings in project's settings files were ignored #54

Merged
merged 4 commits into from
Aug 9, 2014
Merged

Some settings in project's settings files were ignored #54

merged 4 commits into from
Aug 9, 2014

Conversation

palm86
Copy link
Contributor

@palm86 palm86 commented Aug 8, 2014

Setting for instance HUNGER_ENABLE in your settings file previously had no effect.

Setting for instance HUNGER_ENABLE in your settings file previously had no effect.
Some settings in project's settings files were ignored
@@ -21,7 +21,10 @@

def setting(name):
"""Return setting value for given name or default value."""
return getattr(settings, name, None) or DEFAULT_SETTINGS[name]
setting = getattr(settings, name, None)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do instead:

try:
setting = getattr(settings, name)
except AttributeError:
setting = DEFAULT_SETTINGS[name]

@palm86
Copy link
Contributor Author

palm86 commented Aug 9, 2014

I have now made the changes you suggested.

yesimon added a commit that referenced this pull request Aug 9, 2014
Some settings in project's settings files were ignored
@yesimon yesimon merged commit a45b97d into joshuakarjala:master Aug 9, 2014
@yesimon
Copy link
Collaborator

yesimon commented Aug 9, 2014

Thanks!

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.

None yet

2 participants