Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions publisher/worker/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@ def collect(self, url, working_dir):

def _downloadData(self, url):
"""
Downloads the related content/data from the publisher instance and
stores it in memory.
Downloads the related content/data from the publisher instance

Returns the file object of the download file
"""
logger.debug("Downloading file from: %s" % url)
with self._open_url(url) as url_file:
mem_puffer = tempfile.SpooledTemporaryFile()
mem_puffer.write(url_file.read())
mem_puffer.seek(0)
return mem_puffer
temp_file = tempfile.TemporaryFile()
temp_file.write(url_file.read())
temp_file.seek(0)
return temp_file

def _validateData(self, zdata):
"""
Expand Down