use output-module during downloads

This commit is contained in:
Mike Fährmann
2015-12-01 21:22:58 +01:00
parent c786843a6f
commit 4b377ccc09
4 changed files with 13 additions and 36 deletions

View File

@@ -28,10 +28,3 @@ class BasicDownloader():
def download_impl(self, url, file_handle):
"""Actual implementaion of the download process"""
pass
@staticmethod
def print_error(file, error, tries, max_tries=5):
"""Print a message indicating an error during download"""
if tries == 1 and hasattr(file, "name"):
print("\r\033[1;31m", file.name, sep="")
print("\033[0;31m[Error]\033[0m ", error, " (", tries, "/", max_tries, ")", sep="")