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

Unified Diff: cms/bin/test_server.py

Issue 29874564: Issue 6926 - Set "siteurl" to "localhost:5000" in testserver (Closed)
Patch Set: Initial Created Sept. 4, 2018, 2:14 p.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 | docs/api/variables.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cms/bin/test_server.py
===================================================================
--- a/cms/bin/test_server.py
+++ b/cms/bin/test_server.py
@@ -62,17 +62,18 @@
locale, page = path, ''
default_page = source.read_config().get('general', 'defaultpage')
alternative_page = '/'.join([page, default_page]).lstrip('/')
for format in converters.iterkeys():
for p in (page, alternative_page):
if source.has_page(p, format):
- return (p, process_page(source, locale, p, format, 'http://%s:%d' % (address, port)))
+ site_url = 'http://{}:{}'.format(address, port)
+ return (p, process_page(source, locale, p, format, site_url))
if source.has_localizable_file(locale, page):
return (page, source.read_localizable_file(locale, page))
return (None, None)
def has_conflicting_pages(page):
pages = [p for p, _ in source.list_pages()]
« no previous file with comments | « no previous file | docs/api/variables.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld