Change _copy_data() error handling to explain errors not due to broken pipes.

testing/mmn/mktime_takes_localtime_not_gmtime
Isis Lovecruft 2013-06-28 06:40:09 +00:00
parent 328e8fcbe0
commit 603379eb37
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 5 additions and 2 deletions

View File

@ -145,9 +145,12 @@ def _copy_data(instream, outstream):
except IOError:
log.exception("Error sending data: Broken pipe")
break
except IOError:
except IOError as ioe:
# Can get 'broken pipe' errors even when all data was sent
log.exception('Error sending data: Broken pipe')
if 'Broken pipe' in ioe.message:
log.error('Error sending data: Broken pipe')
else:
log.exception(ioe)
break
try:
outstream.close()