Use BeautifulSoup to prettify output of WWW pages before writing

Change-Id: I0a554091f225dff6b312d253a1ff2c1aa2cc8ac9
This commit is contained in:
Christian Berendt 2014-08-14 13:22:42 +02:00
parent c44beb2e0e
commit f9bdae0fd7
2 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
beautifulsoup4
Jinja2
doc8 # Apache-2.0
openstack-doc-tools>=0.20

View File

@ -19,6 +19,7 @@ import logging
import os
import sys
from bs4 import BeautifulSoup
import jinja2
@ -82,6 +83,8 @@ def main():
try:
output = template.render()
soup = BeautifulSoup(output)
output = soup.prettify()
except Exception as e:
logger.error("rendering template %s failed: %s" %
(templateFile, e))