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

Issue 29372215: Noissue - use with and contextlib.closing for closing urlopen stream (Closed)

Created:
Jan. 17, 2017, 11:05 a.m. by Vasily Kuznetsov
Modified:
Jan. 17, 2017, 1:21 p.m.
Reviewers:
Sebastian Noack
CC:
paco, f.nicolaisen
Visibility:
Public.

Description

Noissue - use with and contextlib.closing for closing urlopen stream

Patch Set 1 #

Total comments: 4

Patch Set 2 : Move contextlib.closing into _urlopen #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M sitescripts/extensions/utils.py View 1 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 6
Vasily Kuznetsov
Using contextlib and with to close the stream is better indeed to let's make this ...
Jan. 17, 2017, 11:07 a.m. (2017-01-17 11:07:28 UTC) #1
Sebastian Noack
https://codereview.adblockplus.org/29372215/diff/29372216/sitescripts/extensions/utils.py File sitescripts/extensions/utils.py (right): https://codereview.adblockplus.org/29372215/diff/29372216/sitescripts/extensions/utils.py#newcode263 sitescripts/extensions/utils.py:263: with contextlib.closing( _urlopen(url)) as page: Since we already have ...
Jan. 17, 2017, 11:16 a.m. (2017-01-17 11:16:43 UTC) #2
Vasily Kuznetsov
https://codereview.adblockplus.org/29372215/diff/29372216/sitescripts/extensions/utils.py File sitescripts/extensions/utils.py (right): https://codereview.adblockplus.org/29372215/diff/29372216/sitescripts/extensions/utils.py#newcode263 sitescripts/extensions/utils.py:263: with contextlib.closing( _urlopen(url)) as page: On 2017/01/17 11:16:43, Sebastian ...
Jan. 17, 2017, 11:39 a.m. (2017-01-17 11:39:13 UTC) #3
Sebastian Noack
https://codereview.adblockplus.org/29372215/diff/29372216/sitescripts/extensions/utils.py File sitescripts/extensions/utils.py (right): https://codereview.adblockplus.org/29372215/diff/29372216/sitescripts/extensions/utils.py#newcode263 sitescripts/extensions/utils.py:263: with contextlib.closing( _urlopen(url)) as page: On 2017/01/17 11:39:13, Vasily ...
Jan. 17, 2017, 11:56 a.m. (2017-01-17 11:56:43 UTC) #4
Vasily Kuznetsov
https://codereview.adblockplus.org/29372215/diff/29372216/sitescripts/extensions/utils.py File sitescripts/extensions/utils.py (right): https://codereview.adblockplus.org/29372215/diff/29372216/sitescripts/extensions/utils.py#newcode263 sitescripts/extensions/utils.py:263: with contextlib.closing( _urlopen(url)) as page: On 2017/01/17 11:56:43, Sebastian ...
Jan. 17, 2017, 1:13 p.m. (2017-01-17 13:13:51 UTC) #5
Sebastian Noack
Jan. 17, 2017, 1:15 p.m. (2017-01-17 13:15:24 UTC) #6
LGTM

Powered by Google App Engine
This is Rietveld