Better transfer error handling

This commit is contained in:
Sybren A. Stüvel
2018-06-05 15:12:10 +02:00
parent 44c4ce3a69
commit fc144138d0
3 changed files with 16 additions and 4 deletions
+3 -1
View File
@@ -175,7 +175,9 @@ class Packer:
"""Raises an Aborted exception when abort() was called."""
with self._abort_lock:
if not self._aborted.is_set():
if self._file_transferer is not None and self._file_transferer.has_error:
log.error('A transfer error occurred')
elif not self._aborted.is_set():
return
log.warning('Aborting')