-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
abusehelper.bots.abusech.ransomwarebot: abuse.ch Ransomware Tracker feed #40
Conversation
…omware Tracker feed.
Are the "first seen" values missing the |
info, fileobj = yield utils.fetch_url(self.feed_url) | ||
except utils.FetchUrlFailed, fuf: | ||
self.log.error("Download failed: %r", fuf) | ||
idiokit.stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a good idea to raise abusehelper.core.bot.PollSkipped
here instead of calling idiokit.stop()
so that the PollingBot
dedup filter won't get emptied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style nitpicking:
except utils.FetchUrlFailed, fuf:
should be written as:
except utils.FetchUrlFailed as fuf:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More style nitpicking: Please use new-style string formatting ("Download failed: {0!r}".format(...)
) for new code.
Also, there's the utils.format_exception(exc)
for nice formatting of exceptions, so the above could become (arguably more verbose):
self.log.error("Download failed ({0})".format(utils.format_exception(fuf)))
…tches. Style fixes.
Looks good to me 👍 |
abusehelper.bots.abusech.ransomwarebot: abuse.ch Ransomware Tracker feed
Polling bot for abuse.ch Ransomware Tracker feed.