diff --git a/source/tools/detect/io/iofsstat/iostatClass.py b/source/tools/detect/io/iofsstat/iostatClass.py index 9f16ebe8de4fdf5cd6065d44baaf6c96e8f04ab2..d288f828fb868abb4e60b36a9e06796dad34a410 100755 --- a/source/tools/detect/io/iofsstat/iostatClass.py +++ b/source/tools/detect/io/iofsstat/iostatClass.py @@ -121,6 +121,9 @@ class iostatClass(diskstatClass): oneIO = entry.split() matchObj = re.match( r'(.*) \[([^\[\]]*)\] (.*) \[([^\[\]]*)\]\n', entry) + # Fix the NoneType error when the match fails + if not matchObj: + continue comm = matchObj.group(4) pid = matchObj.group(1).rsplit('-', 1)[1].strip() if self.pid is not None and int(pid) != self.pid: