if stream is None:
try:
(stream, tmpfilename) = sanitize_open(tmpfilename, open_mode)
+ assert stream is not None
filename = self.undo_temp_name(tmpfilename)
self.report_destination(filename)
except (OSError, IOError), err:
# Apply rate limit
self.slow_down(start, byte_counter - resume_len)
+ if stream is None:
+ self.trouble(u'\nERROR: Did not get any data blocks')
+ return False
stream.close()
self.report_finish()
if data_len is not None and byte_counter != data_len: