Fix minor bug in the not-found message handling

pull/1062/head
Igor Chubin 1 month ago
parent 5675af9864
commit 6c60a84c7e

@ -136,8 +136,12 @@ def _wego_postprocessing(location, parsed_query, stdout):
if parsed_query["days"] == "2": if parsed_query["days"] == "2":
stdout = "\n".join(stdout.splitlines()[:27]) + "\n" stdout = "\n".join(stdout.splitlines()[:27]) + "\n"
first = stdout.splitlines()[0] lines = stdout.splitlines()
rest = stdout.splitlines()[1:] if not lines:
lines = [""]
first = lines[0]
rest = lines[1:]
if parsed_query.get("no-caption", False): if parsed_query.get("no-caption", False):
if ":" in first: if ":" in first:
first = first.split(":", 1)[1] first = first.split(":", 1)[1]

Loading…
Cancel
Save