mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
curl tests: reduce verbosity
This commit is contained in:
parent
c705b6b171
commit
a5b35d218d
1 changed files with 8 additions and 4 deletions
|
@ -160,10 +160,14 @@ def run(tests):
|
||||||
|
|
||||||
|
|
||||||
def display_result(result):
|
def display_result(result):
|
||||||
print(f"URL : {result['url']}")
|
if result["effective_url"] == result["url"]:
|
||||||
print(f"Real URL: {result['effective_url']}")
|
print(f"URL : {result['url']} (redirected to -> {result['effective_url']})")
|
||||||
print(f"Code : {result['code']}")
|
else:
|
||||||
print(f"Title : {result['title'].strip()}")
|
print(f"URL : {result['url']}")
|
||||||
|
if result['code'] != 200:
|
||||||
|
print(f"Code : {result['code']}")
|
||||||
|
if result["title"].strip():
|
||||||
|
print(f"Title : {result['title'].strip()}")
|
||||||
print(f"Content extract:\n{result['content'][:250].strip()}")
|
print(f"Content extract:\n{result['content'][:250].strip()}")
|
||||||
if result["errors"]:
|
if result["errors"]:
|
||||||
print("Errors :\n -" + "\n -".join(result['errors']))
|
print("Errors :\n -" + "\n -".join(result['errors']))
|
||||||
|
|
Loading…
Add table
Reference in a new issue