Fix documentation in function _copy_data(). WONTFIX hanging FD problem #1921
* Won't fix hanging file descriptor problem due to this problem requiring a complete rewrite of nearly every function in the module. * Closes #1921, #1927, #1929. * Fix whitespace styling.feature/documentation-builds-dirhtml
parent
6398ddcf28
commit
6074a24c0b
9
gnupg.py
9
gnupg.py
|
@ -92,12 +92,19 @@ if not logger.handlers:
|
||||||
logger.addHandler(NullHandler())
|
logger.addHandler(NullHandler())
|
||||||
|
|
||||||
def _copy_data(instream, outstream):
|
def _copy_data(instream, outstream):
|
||||||
# Copy one stream to another
|
"""
|
||||||
|
Copy data from one stream to another.
|
||||||
|
|
||||||
|
@param instream: A file descriptor to read from.
|
||||||
|
@param outstream: A file descriptor to write to.
|
||||||
|
"""
|
||||||
sent = 0
|
sent = 0
|
||||||
|
|
||||||
if hasattr(sys.stdin, 'encoding'):
|
if hasattr(sys.stdin, 'encoding'):
|
||||||
enc = sys.stdin.encoding
|
enc = sys.stdin.encoding
|
||||||
else:
|
else:
|
||||||
enc = 'ascii'
|
enc = 'ascii'
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
data = instream.read(1024)
|
data = instream.read(1024)
|
||||||
if len(data) == 0:
|
if len(data) == 0:
|
||||||
|
|
Loading…
Reference in New Issue