Commit 2cc45d87 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(proxy) regression in zip file download

(cherry picked from commit 83627572)
parent e2a771e2
...@@ -55,7 +55,6 @@ class Downloader(object): ...@@ -55,7 +55,6 @@ class Downloader(object):
self._url = url self._url = url
self._timeout = timeout self._timeout = timeout
self._source_handle = None self._source_handle = None
self._target_data = None
def fetch(self): def fetch(self):
""" fetch (raw) source data into tempfile using self._source_handle """ fetch (raw) source data into tempfile using self._source_handle
...@@ -107,8 +106,7 @@ class Downloader(object): ...@@ -107,8 +106,7 @@ class Downloader(object):
compression=zipfile.ZIP_DEFLATED) as zf: compression=zipfile.ZIP_DEFLATED) as zf:
for item in zf.infolist(): for item in zf.infolist():
if item.file_size > 0: if item.file_size > 0:
yield item.filename, zf.read(item) yield item.filename, zf.open(item)
self._target_data = target_data
else: else:
yield os.path.basename(self._url), self._source_handle yield os.path.basename(self._url), self._source_handle
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment