From: Darrick J. Wong Date: Tue, 25 Oct 2016 22:14:30 +0000 (-0700) Subject: xfs_buflock: handling parsing errors more gracefully X-Git-Tag: v4.9.0-rc1~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f231685e0bd91355670aaaef01a594667b825ed8;p=thirdparty%2Fxfsprogs-dev.git xfs_buflock: handling parsing errors more gracefully Skip ftrace output lines that don't parse. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/tools/xfsbuflock.py b/tools/xfsbuflock.py index f307461d1..82b6e01f5 100755 --- a/tools/xfsbuflock.py +++ b/tools/xfsbuflock.py @@ -150,7 +150,10 @@ for line in fileinput.input(): if len(toks) < 4: continue pid = toks[0] - time = float(toks[2][:-1]) + try: + time = float(toks[2][:-1]) + except: + continue fn = toks[3][:-1] if pid in processes: