From 56ba00aa501f9cc67f1a7dabab53c5541dbd94ee Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 19 Dec 2014 16:39:56 +0000 Subject: Log errors, but try to not crash with logview encounters the unexpected. --- scripts/logview | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/logview b/scripts/logview index 251eb22a0..334f07496 100755 --- a/scripts/logview +++ b/scripts/logview @@ -52,6 +52,9 @@ def search_logs(opts, logfiles): timestamp = os.path.basename(os.path.dirname(fn)) for line in open(fn): things = line.split('\t') + if len(things) < 5: + msg += "(logview error - unhandled line): %r\n" % line + continue if things[2] in opts.search_terms or 'ANY' in opts.search_terms: slurp = json.loads(things[4]) if opts.profile: -- cgit