From e3a65b15282a6bae50686c20c7ecdf4d9dca8c84 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Wed, 4 May 2022 17:33:13 -0700 Subject: [PATCH] log-search: Some Django log lines do not include hostname. --- scripts/log-search | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/log-search b/scripts/log-search index 731713b2ef..a2f98876f8 100755 --- a/scripts/log-search +++ b/scripts/log-search @@ -313,7 +313,9 @@ def print_line( url = f"{BOLD}{match['path']}" if filter_type != FilterType.HOSTNAME: hostname = match["hostname"] - if not args.nginx: + if hostname is None: + hostname = "???.zulipchat.com" + elif not args.nginx: if hostname == "root": hostname = "zulip.com" else: