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 bug setting options programatically #498

Merged
merged 1 commit into from
May 7, 2012

Conversation

mckoss
Copy link
Contributor

@mckoss mckoss commented Apr 26, 2012

Previously, if you set an option in code:

options.my_option = value

this would overwrite the _Options attribute with a non _Option value. This would break subsequent retrieval of the option. This code change adds a parallel setattr to the existing getattr.

I also fixed a bug with the root type - 'str' should have been 'basesting' - since we return a _unicode() converted string - which fails when you try to set the value back again.

@bdarnell
Copy link
Member

bdarnell commented May 7, 2012

Hmm, I was actually surprised to learn that string options are actually type unicode - I guess I've only ever used ascii values in python2 so I never noticed. This looks like a good change.

bdarnell added a commit that referenced this pull request May 7, 2012
fix bug setting options programatically
@bdarnell bdarnell merged commit 625c6e0 into tornadoweb:master May 7, 2012
Rudd-O pushed a commit to Rudd-O/tornado that referenced this pull request Jun 27, 2013
fix bug setting options programatically
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