Skip to content

Commit 0faad5e

Browse files
authored
Merge pull request #670 from dumprop/patch-1
fix typo in VT hunting feed
2 parents 0dcbf2c + 9a57eca commit 0faad5e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

plugins/feeds/public/virustotal_hunting.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ class VirusTotalHunting(Feed):
2424
def update(self):
2525
api_key = yeti_config.get("vt", "key")
2626

27-
if api_key:
28-
self.source = (
29-
"https://www.virustotal.com/intelligence/hunting/notifications-feed/?key=%s"
30-
% api_key
31-
)
32-
for index, item in self.update_json(key="notifications"):
33-
self.analyze(item)
34-
else:
35-
logging.error("Your VT API key is not set in the confile file")
27+
if not api_key:
28+
raise Exception("Your VT API key is not set in the yeti.conf file")
29+
30+
self.source = (
31+
"https://www.virustotal.com/intelligence/hunting/notifications-feed/?key=%s"
32+
% api_key
33+
)
34+
for index, item in self.update_json(key="notifications"):
35+
self.analyze(item)
3636

3737
def analyze(self, item):
3838
tags = []

0 commit comments

Comments
 (0)