def run(self):
        packet = self._packet
        # Download from URL to file
        for file_key in self.FILE_KEYS:
            url, file = packet[file_key]
            print('Dowloading {!r} => {!r}'.format(url, file))
            if url and file:
                try:
                    _open_url(url, file)
                except urllib.error.URLError as e:
                    try:
                        packet['error'] = e.reason + '@url'
                    # When 'reason' is not a string object
                    except __HOLE__:
                        packet['error'] = '{!r} @url'.format(e.reason)
            # TODO: what happens if not url or not file ???
            print('File {!r} has been downloaded.'.format(file))
        # Put packet into queue
        self._queue.put((self._index, packet))



#------------------------------------------------------------------------------#
dataset/ETHPy150Open petervaro/coublet/models/com.py/CoubletDownloadPacketThread.run