Merge "Use BeautifulSoup to prettify output of WWW pages before writing"

This commit is contained in:
Jenkins 2014-10-21 15:45:50 +00:00 committed by Gerrit Code Review
commit 44e5c4b5b1
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))