Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: cms/utils.py

Issue 29328208: Noissue - [CMS] Avoid overzealous catching of KeyError during conversion (Closed)
Patch Set: Go back to using try... catch Created Sept. 21, 2015, 11:03 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
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: cms/utils.py
diff --git a/cms/utils.py b/cms/utils.py
index 66d8498f74582a93b1fff3ccac87879d2877654b..4ac14d638f2903bd7823e944b3897f491d94dfb4 100644
--- a/cms/utils.py
+++ b/cms/utils.py
@@ -49,10 +49,12 @@ def get_page_params(source, locale, page, format=None, site_url_override=None,
params["site_url"] = params["config"].get("general", "siteurl")
try:
- converter = converters[format](params)
+ converter = converters[format]
Wladimir Palant 2015/09/21 11:18:02 I think this variable is better called converter_c
kzar 2015/09/21 11:23:15 Done.
except KeyError:
raise Exception("Page %s uses unknown format %s" % (page, format))
+ converter = converter(params)
+
# Note: The converter might change some parameters so we can only read in
# template data here.
params["templatedata"] = source.read_template(params["template"])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld