Fix possible IOError due to second write() call in _copy_data().
* Fixes #1931.feature/documentation-builds-dirhtml
parent
a5967495b9
commit
8d6e12c0be
6
gnupg.py
6
gnupg.py
|
@ -114,7 +114,11 @@ def _copy_data(instream, outstream):
|
|||
try:
|
||||
outstream.write(data)
|
||||
except UnicodeError:
|
||||
outstream.write(data.encode(enc))
|
||||
try:
|
||||
outstream.write(data.encode(enc))
|
||||
except IOError:
|
||||
logger.exception('Error sending data: Broken pipe')
|
||||
break
|
||||
except IOError:
|
||||
# Can sometimes get 'broken pipe' errors even when the
|
||||
# data has all been sent
|
||||
|
|
Loading…
Reference in New Issue