Skip to content

Commit ab8a2af

Browse files
committed
Fix ops detection when not proper file close
1 parent 77fe9ee commit ab8a2af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Collectors/DetailedCollector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def addRecord(self, sid, userID, fileClose, timestamp, addr, openTime):
135135
rec['readv'] = fileClose.readv
136136
rec['write'] = fileClose.write
137137

138-
if fileClose.ops:
138+
if isinstance(fileClose, decoding.fileClose) and fileClose.ops:
139139
# read_average (optional)
140140
try:
141141
rec['read_average'] = (fileClose.read + fileClose.readv) / (fileClose.ops.read + fileClose.ops.readv)

0 commit comments

Comments
 (0)