[Zope-Checkins] CVS: Zope2 - load_site.py:1.8
Brian Lloyd
brian@digicool.com
Wed, 21 Mar 2001 15:40:13 -0500 (EST)
Update of /cvs-repository/Zope2/utilities
In directory korak:/home/brian/temp/mainline_test/utilities
Modified Files:
load_site.py
Log Message:
merged fix to use new dtml syntax from branch
--- Updated File load_site.py in package Zope2 --
--- load_site.py 2001/03/21 15:48:53 1.7
+++ load_site.py 2001/03/21 20:40:13 1.8
@@ -303,19 +303,23 @@
parser.close()
infile.close()
- return string.strip(parser.title), string.strip(parser.head), \
-"""<!--#var standard_html_header-->
+ return (string.strip(parser.title), string.strip(parser.head),
+ string.strip(parser.accumulator))
-""" + string.strip(parser.accumulator) + """
-<!--#var standard_html_footer-->"""
-
-
def upload_html(object, f):
dir, name = os.path.split(f)
f=open(f)
+
+ if doctor:
+ title, head, body = parse_html(f)
+ if old:
+ body = ("<!--#var standard_html_header-->\n\n" +
+ body + "\n\n<!--#var standard_html_footer-->")
+ else:
+ body = ("<dtml-var standard_html_header>\n\n" +
+ body + "\n\n<dtml-var standard_html_footer>")
- if doctor: title, head, body = parse_html(f)
else:
if old: f=f.read()
title, head, body = '', '', f