mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
curl tests: handle edge case where .find('body') returns None
This commit is contained in:
parent
53998f051d
commit
6e48040cbc
1 changed files with 2 additions and 1 deletions
|
@ -163,7 +163,8 @@ def test(
|
||||||
except Exception:
|
except Exception:
|
||||||
title = ""
|
title = ""
|
||||||
|
|
||||||
content = html.find("body").get_text().strip()
|
content = html.find("body")
|
||||||
|
content = content.get_text().strip() if content else ""
|
||||||
content = re.sub(r"[\t\n\s]{3,}", "\n\n", content)
|
content = re.sub(r"[\t\n\s]{3,}", "\n\n", content)
|
||||||
|
|
||||||
errors = []
|
errors = []
|
||||||
|
|
Loading…
Add table
Reference in a new issue