Fix the BeautifulSoup warning

To get rid of this warning, change code that looks like this:
 BeautifulSoup(YOUR_MARKUP})
to this:
 BeautifulSoup(YOUR_MARKUP, "html.parser")

This patch fix the warning

Change-Id: I60d338f9b8365a46f0acc611989e0e109759b748
This commit is contained in:
zhurong 2017-07-10 13:26:31 +08:00
parent 0f21fc1fba
commit 6eade2586b
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ except ImportError:
def parse_api_error(api_error_html):
error_html = bs4.BeautifulSoup(api_error_html)
error_html = bs4.BeautifulSoup(api_error_html, "html.parser")
body = error_html.find('body')
if (not body or not body.text):
return None