Fix download error reporting
Threaded downloads now store the exception for passing to the caller. Change-Id: Ibe4a7a267b04a2775ad3775dd904a4e3c7520ebb
This commit is contained in:
@@ -74,10 +74,14 @@ class FileDownloader(threading.Thread):
|
||||
self.wc = webclient
|
||||
self.url = url
|
||||
self.savefile = savefile
|
||||
self.exc = None
|
||||
super(FileDownloader, self).__init__()
|
||||
|
||||
def run(self):
|
||||
self.wc.download(self.url, self.savefile)
|
||||
try:
|
||||
self.wc.download(self.url, self.savefile)
|
||||
except Exception as e:
|
||||
self.exc = e
|
||||
|
||||
|
||||
def get_upload_form(filename, data, formname, otherfields):
|
||||
|
||||
Reference in New Issue
Block a user