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.
This commit is contained in:
Zev Benjamin 2016-02-02 12:36:18 -08:00 committed by Tim Abbott
parent 206dc3aafc
commit e780f5dab5
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ def process_logs():
file_data = last_data.get(log_file, {}) file_data = last_data.get(log_file, {})
if not os.path.exists(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 # 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 continue
length = int(subprocess.check_output(["wc", "-l", log_file]).split()[0]) length = int(subprocess.check_output(["wc", "-l", log_file]).split()[0])
if file_data.get("last") is None: if file_data.get("last") is None: