From 1c1e9ecbf1b80a01b0ebcd25c0c5d5f0718dbfcd Mon Sep 17 00:00:00 2001 From: Antoine Busque Date: Fri, 1 Aug 2014 16:38:55 -0400 Subject: [PATCH] Fix: don't long null FDs to database --- fd-info.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fd-info.py b/fd-info.py index 2a0fce5..84d613b 100755 --- a/fd-info.py +++ b/fd-info.py @@ -319,8 +319,10 @@ class FDInfo(): latency = {'ts_start': entry['start'], 'duration': duration_ns, 'pid': pid, - 'category': category, - 'fd': fd} + 'category': category} + + if fd is not None: + latency['fd'] = fd if ret < 0: latency['errno'] = -ret -- 2.34.1