MCPcopy Create free account
hub / github.com/bitsadmin/wesng / get_most_recent_kb

Function get_most_recent_kb

wes.py:797–803  ·  view source on GitHub ↗
(results)

Source from the content-addressed store, hash-verified

795
796# Obtain most recent KB from a dictionary of results
797def get_most_recent_kb(results):
798 dates = [int(r['DatePosted']) for r in results if r['DatePosted']]
799 if dates:
800 date = str(max(dates))
801 return list(filter(lambda kb: kb['DatePosted'] == date, results))[0]
802 else:
803 return None
804
805
806# Output results of wes.py to screen

Callers 2

mainFunction · 0.85
print_summaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected