From 8c188cda493b2b50f849db737c0adc41784af9ae Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Tue, 2 Feb 2016 12:36:18 -0800 Subject: [PATCH] Make log2zulip error message more accurate. In particular, in the case of a permissions issue reading the log file, it would claim the log file doesn't exist. --- bots/log2zulip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bots/log2zulip b/bots/log2zulip index d8750c8..8907a72 100755 --- a/bots/log2zulip +++ b/bots/log2zulip @@ -62,7 +62,7 @@ def process_logs(): file_data = last_data.get(log_file, {}) if not os.path.exists(log_file): # If the file doesn't exist, log an error and then move on to the next file - print "Log file %s does not exist!" % (log_file,) + print "Log file does not exist or could not stat log file: %s" % (log_file,) continue length = int(subprocess.check_output(["wc", "-l", log_file]).split()[0]) if file_data.get("last") is None: