mirror of https://github.com/zulip/zulip.git
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:
parent
206dc3aafc
commit
e780f5dab5
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue