Fix beautifulsoup warning
With current beautifulsoup package we get this warning when running www-generator.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently. To get rid of this warning, change this: BeautifulSoup([your markup]) to this: BeautifulSoup([your markup], "lxml") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Follow the advise to fix the warning. Change-Id: I9409bac23797168296fee93f5398e6f5a9852a73
This commit is contained in:
parent
9f7172dc08
commit
b42ac480e5
@ -81,7 +81,7 @@ def main():
|
||||
|
||||
try:
|
||||
output = template.render()
|
||||
soup = BeautifulSoup(output)
|
||||
soup = BeautifulSoup(output, "lxml")
|
||||
output = soup.prettify()
|
||||
except Exception as e:
|
||||
logger.error("rendering template %s failed: %s" %
|
||||
|
Loading…
Reference in New Issue
Block a user