Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29370984: Fixes 4784 - Improve error reporting in updateMalwareDomainsList and add tests (Closed)

Created:
Jan. 10, 2017, 6:08 p.m. by Vasily Kuznetsov
Modified:
Jan. 23, 2017, 9:28 a.m.
Visibility:
Public.

Description

Fixes 4784 - Improve error reporting in updateMalwareDomainsList and add tests Repository: https://hg.adblockplus.org/sitescripts Base revision: e4f054a8b28b

Patch Set 1 #

Total comments: 12

Patch Set 2 : Close streams more carefully #

Total comments: 4

Patch Set 3 : Improve the error handling flow in try_mirror #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -11 lines) Patch
M sitescripts/subscriptions/bin/updateMalwareDomainsList.py View 1 2 2 chunks +21 lines, -10 lines 0 comments Download
A sitescripts/subscriptions/test/test_updateMalwareDomainsList.py View 1 1 chunk +99 lines, -0 lines 0 comments Download
M tox.ini View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 17
Vasily Kuznetsov
https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py File sitescripts/subscriptions/bin/updateMalwareDomainsList.py (left): https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py#oldcode69 sitescripts/subscriptions/bin/updateMalwareDomainsList.py:69: zip = zipfile.ZipFile(StringIO(data), 'r') These three lines are an ...
Jan. 10, 2017, 6:18 p.m. (2017-01-10 18:18:30 UTC) #1
Vasily Kuznetsov
bump
Jan. 16, 2017, 6:38 p.m. (2017-01-16 18:38:19 UTC) #2
Sebastian Noack
On 2017/01/16 18:38:19, Vasily Kuznetsov wrote: > bump As discussed on IRC, I leave the ...
Jan. 16, 2017, 7:05 p.m. (2017-01-16 19:05:51 UTC) #3
Jon Sonesen
Looks pretty ok, mostly see the comment about using the exception attribute reason as a ...
Jan. 18, 2017, 5:04 p.m. (2017-01-18 17:04:48 UTC) #4
Vasily Kuznetsov
Thanks for the comment, Jon. After looking at it in more detail I think that ...
Jan. 18, 2017, 6:46 p.m. (2017-01-18 18:46:35 UTC) #5
Jon Sonesen
On 2017/01/18 18:46:35, Vasily Kuznetsov wrote: > Thanks for the comment, Jon. After looking at ...
Jan. 19, 2017, 7:49 a.m. (2017-01-19 07:49:52 UTC) #6
Sebastian Noack
https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py File sitescripts/subscriptions/bin/updateMalwareDomainsList.py (right): https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py#newcode40 sitescripts/subscriptions/bin/updateMalwareDomainsList.py:40: url = mirror + MALWAREDOMAINS_PATH This line doesn't seem ...
Jan. 19, 2017, 9:01 a.m. (2017-01-19 09:01:29 UTC) #7
Jon Sonesen
https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py File sitescripts/subscriptions/bin/updateMalwareDomainsList.py (right): https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py#newcode41 sitescripts/subscriptions/bin/updateMalwareDomainsList.py:41: response = urllib2.urlopen(url) On 2017/01/19 09:01:29, Sebastian Noack wrote: ...
Jan. 19, 2017, 9:31 a.m. (2017-01-19 09:31:24 UTC) #8
Jon Sonesen
On 2017/01/19 09:31:24, Jon Sonesen wrote: > https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py > File sitescripts/subscriptions/bin/updateMalwareDomainsList.py (right): > > https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py#newcode41 ...
Jan. 19, 2017, 9:33 a.m. (2017-01-19 09:33:53 UTC) #9
Jon Sonesen
Jan. 19, 2017, 9:33 a.m. (2017-01-19 09:33:58 UTC) #10
Sebastian Noack
https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py File sitescripts/subscriptions/bin/updateMalwareDomainsList.py (right): https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py#newcode41 sitescripts/subscriptions/bin/updateMalwareDomainsList.py:41: response = urllib2.urlopen(url) On 2017/01/19 09:31:24, Jon Sonesen wrote: ...
Jan. 19, 2017, 9:48 a.m. (2017-01-19 09:48:18 UTC) #11
Jon Sonesen
https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py File sitescripts/subscriptions/bin/updateMalwareDomainsList.py (right): https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py#newcode41 sitescripts/subscriptions/bin/updateMalwareDomainsList.py:41: response = urllib2.urlopen(url) On 2017/01/19 09:48:18, Sebastian Noack wrote: ...
Jan. 19, 2017, 9:55 a.m. (2017-01-19 09:55:01 UTC) #12
Vasily Kuznetsov
Thanks for all the comments. Now all the streams are carefully closed. https://codereview.adblockplus.org/29370984/diff/29370985/sitescripts/subscriptions/bin/updateMalwareDomainsList.py File sitescripts/subscriptions/bin/updateMalwareDomainsList.py ...
Jan. 19, 2017, 4:34 p.m. (2017-01-19 16:34:08 UTC) #13
Sebastian Noack
https://codereview.adblockplus.org/29370984/diff/29372682/sitescripts/subscriptions/bin/updateMalwareDomainsList.py File sitescripts/subscriptions/bin/updateMalwareDomainsList.py (right): https://codereview.adblockplus.org/29370984/diff/29372682/sitescripts/subscriptions/bin/updateMalwareDomainsList.py#newcode46 sitescripts/subscriptions/bin/updateMalwareDomainsList.py:46: if hasattr(exc, 'close'): On 2017/01/19 16:34:08, Vasily Kuznetsov wrote: ...
Jan. 19, 2017, 5:13 p.m. (2017-01-19 17:13:33 UTC) #14
Vasily Kuznetsov
https://codereview.adblockplus.org/29370984/diff/29372682/sitescripts/subscriptions/bin/updateMalwareDomainsList.py File sitescripts/subscriptions/bin/updateMalwareDomainsList.py (right): https://codereview.adblockplus.org/29370984/diff/29372682/sitescripts/subscriptions/bin/updateMalwareDomainsList.py#newcode46 sitescripts/subscriptions/bin/updateMalwareDomainsList.py:46: if hasattr(exc, 'close'): On 2017/01/19 17:13:33, Sebastian Noack wrote: ...
Jan. 20, 2017, 1:44 p.m. (2017-01-20 13:44:49 UTC) #15
Sebastian Noack
LGTM
Jan. 20, 2017, 2:09 p.m. (2017-01-20 14:09:48 UTC) #16
Jon Sonesen
Jan. 20, 2017, 2:17 p.m. (2017-01-20 14:17:53 UTC) #17
On 2017/01/20 14:09:48, Sebastian Noack wrote:
> LGTM

LGTM

Powered by Google App Engine
This is Rietveld