Give gnupg.GPGBase._read_data() a better docstring.

fix/24-enc-to-file
Isis Lovecruft 2013-10-08 10:28:37 +00:00
parent 10d7e61ee4
commit ade3ec97ee
No known key found for this signature in database
GPG Key ID: 5C17776E27F7E84D
1 changed files with 9 additions and 1 deletions

View File

@ -523,7 +523,15 @@ class GPGBase(object):
result.stderr = ''.join(lines)
def _read_data(self, stream, result):
"""Read the contents of the file from GPG's stdout."""
"""Incrementally read from ``stream`` and store read data.
All data gathered from calling ``stream.read()`` will be concatenated
and stored as ``result.data``.
:param stream: An open file-like object to read() from.
:param result: An instance of one of the result parsing classes from
:attr:`GPGBase._result_mapping`.
"""
chunks = []
while True:
data = stream.read(1024)