Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: app_config.py

Issue 23602002: Fix handling of unset AppConfig model properties. (Closed) Base URL: https://git.chromium.org/git/chromium/tools/reviewbot.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app_config.py
diff --git a/app_config.py b/app_config.py
index 1171517d6962cbb46245ef0a85fae09826c21801..bf3a6982e0fcf814f3b215f1a36c1da3449bb43b 100644
--- a/app_config.py
+++ b/app_config.py
@@ -61,7 +61,7 @@ class AppConfigHandler(webapp2.RequestHandler):
for field in FIELDS:
self.response.write(
'<tr><td>%s</td><td><textarea name="%s">%s</textarea></td></tr>' %
- (field, field, cgi.escape(getattr(app_config, field, ''))))
+ (field, field, cgi.escape(getattr(app_config, field) or '')))
agable 2013/08/27 14:35:15 can simply use getattr(app_config, field, '') inst
Mattias Nissler (ping if slow) 2013/08/27 14:40:09 That's what I had before. It doesn't work in this
self.response.write('<tr><td><input type="submit" value="Set"></td></tr>')
self.response.write('</table><form></body></body>')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698