From 775b9cc8bb83bde737035877a19f9eb00733c838 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 16 Jan 2014 18:36:19 -0500 Subject: [PATCH] Don't send a Zulip notification about 0 lines. (imported from commit cc8ce4d95978264cd05bc26f77a5d770abdf5add) --- bots/log2zulip | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bots/log2zulip b/bots/log2zulip index 1dc0ad0..2c3bfac 100755 --- a/bots/log2zulip +++ b/bots/log2zulip @@ -43,7 +43,9 @@ def process_lines(raw_lines, file_name): continue lines.append(line) - if len(lines) > 10: + if len(lines) == 0: + return + elif len(lines) > 10: send_log_zulip(file_name, len(lines), lines[0:3], extra=", examples include") else: send_log_zulip(file_name, len(lines), lines)