Skip to content
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

Merged
7 commits merged into from
Mar 9, 2016

Conversation

ghost
Copy link

@ghost ghost commented Mar 8, 2016

Polling bot for abuse.ch Ransomware Tracker feed.

@ghost ghost changed the title abusehelper.bots.abusech.ransomwarebot: Polling bot for abuse.ch Rans… abusehelper.bots.abusech.ransomwarebot: abuse.ch Ransomware Tracker feed Mar 8, 2016
@ghost ghost added this to the 3.1.0 milestone Mar 8, 2016
@ghost ghost added the enhancement label Mar 8, 2016
@ghost ghost self-assigned this Mar 8, 2016
@ghost
Copy link
Author

ghost commented Mar 8, 2016

Are the "first seen" values missing the Z timezone marker?

info, fileobj = yield utils.fetch_url(self.feed_url)
except utils.FetchUrlFailed, fuf:
self.log.error("Download failed: %r", fuf)
idiokit.stop()
Copy link

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.

Copy link
Contributor

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:

Copy link

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)))

@ghost
Copy link
Author

ghost commented Mar 8, 2016

Looks good to me 👍

ghost pushed a commit that referenced this pull request Mar 9, 2016
abusehelper.bots.abusech.ransomwarebot: abuse.ch Ransomware Tracker feed
@ghost ghost merged commit be1238e into master Mar 9, 2016
@ghost ghost deleted the feature-abusech-ransomwarebot branch March 9, 2016 07:23
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants