Use BeautifulSoup to prettify output of WWW pages before writing
Change-Id: I0a554091f225dff6b312d253a1ff2c1aa2cc8ac9
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user