[Pkg-mozext-commits] [adblock-plus] 62/87: Noissue - Refactor code downloading and unpacking jsshell for better readability

David Prévot taffit at moszumanska.debian.org
Sat Apr 30 17:59:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 104e6202a38ab8e9ecec6a5faa91e2124212d8d1
Author: Sebastian Noack <sebastian at adblockplus.org>
Date:   Mon Apr 18 14:27:45 2016 +0200

    Noissue - Refactor code downloading and unpacking jsshell for better readability
    
    https://codereview.adblockplus.org/29340497
---
 utils.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/utils.py b/utils.py
index 3c9a752..87e9d23 100644
--- a/utils.py
+++ b/utils.py
@@ -48,9 +48,11 @@ def ensureJSShell():
 
     if os.path.exists(path):
         return path
+    
+    with closing(urllib.urlopen(JSSHELL_URL % build)) as response:
+        data = response.read()
 
-    with closing(urllib.urlopen(JSSHELL_URL % build)) as response, \
-        zipfile.ZipFile(StringIO(response.read())) as zip:
+    with zipfile.ZipFile(StringIO(data)) as zip:
         zip.extractall(shell_dir)
 
     if not os.path.exists(path):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list