From bbed4a625d932e633b16488c5c817994c467ca2b Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 30 Aug 2017 10:01:48 -0700 Subject: [PATCH] log2zulip: Fix an extremely long line. --- zulip/integrations/log2zulip/log2zulip | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zulip/integrations/log2zulip/log2zulip b/zulip/integrations/log2zulip/log2zulip index f260aa8..699fff6 100755 --- a/zulip/integrations/log2zulip/log2zulip +++ b/zulip/integrations/log2zulip/log2zulip @@ -88,7 +88,8 @@ def process_logs(): # a log file ends up at the same line length as before # immediately after rotation, this tool won't notice. file_data["last"] = 1 - new_lines = subprocess.check_output(["tail", "-n+%s" % (file_data["last"],), log_file]).decode('utf-8', errors='replace').split('\n')[:-1] + output = subprocess.check_output(["tail", "-n+%s" % (file_data["last"],), log_file]) + new_lines = output.decode('utf-8', errors='replace').split('\n')[:-1] if len(new_lines) > 0: process_lines(new_lines, filename) file_data["last"] += len(new_lines)