safe.utilities.file_downloader module

InaSAFE Disaster risk assessment tool developed by AusAid -
IS Utilities implementation.

Contact :


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

class safe.utilities.file_downloader.FileDownloader(manager, url, output_path, progress_dialog=None)[source]

Bases: object

The blueprint for downloading file from url.


Downloading the file.

Returns:True if success, otherwise returns a tuple with format like this (QNetworkReply.NetworkError, error_message)
Raises:IOError - when cannot create output_path

Get buffer from self.reply and store it to our buffer container.


Write data to a file.