def __nonzero__(self):
"""Required for the JSON reporting module as otherwise the on-demand
generated list of API calls would be seen as empty.
Note that the result structure is kept between processing and
reporting time which means that at reporting time, where this
functionality is actually needed, the has_apicalls will already have
been set while iterating through the BSON logs iterator in the parse()
function of the WindowsMonitor class. We use this knowledge to pass
along whether or not this log actually has API call events and thus
whether it's "nonzero" or not. (The correctness of this field is
required as otherwise the json.dump() function will fail - probably
due to buffering issues).
"""
return self.has_apicalls
评论列表
文章目录