summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2014-02-21 16:01:32 -0800
committerJeff Forcier <jeff@bitprophet.org>2014-02-21 16:01:32 -0800
commita529e93256e300d8d07354d020e68ae7d45bdd45 (patch)
treec27526b366f516f98b2638ef8119830f22bc5388
parent91c47b17482ccabc64e6448cc0e1d48c38251105 (diff)
BufferedPipe
-rw-r--r--paramiko/buffered_pipe.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/paramiko/buffered_pipe.py b/paramiko/buffered_pipe.py
index 052b6c69..43bfa47d 100644
--- a/paramiko/buffered_pipe.py
+++ b/paramiko/buffered_pipe.py
@@ -17,7 +17,7 @@
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
"""
-Attempt to generalize the "feeder" part of a Channel: an object which can be
+Attempt to generalize the "feeder" part of a `.Channel`: an object which can be
read from and closed, but is reading from a buffer fed by another thread. The
read operations are blocking and can have a timeout set.
"""
@@ -107,19 +107,18 @@ class BufferedPipe (object):
The optional ``timeout`` argument can be a nonnegative float expressing
seconds, or ``None`` for no timeout. If a float is given, a
- ``PipeTimeout`` will be raised if the timeout period value has
- elapsed before any data arrives.
+ `.PipeTimeout` will be raised if the timeout period value has elapsed
+ before any data arrives.
- :param nbytes: maximum number of bytes to read
- :type nbytes: int
- :param timeout: maximum seconds to wait (or ``None``, the default, to
- wait forever)
- :type timeout: float
+ :param int nbytes: maximum number of bytes to read
+ :param float timeout:
+ maximum seconds to wait (or ``None``, the default, to wait forever)
:return: data
:rtype: str
- :raises PipeTimeout: if a timeout was specified and no data was ready
- before that timeout
+ :raises PipeTimeout:
+ if a timeout was specified and no data was ready before that
+ timeout
"""
out = ''
self._lock.acquire()
@@ -189,7 +188,7 @@ class BufferedPipe (object):
"""
Return the number of bytes buffered.
- :return: number of bytes bufferes
+ :return: number of bytes buffered
:rtype: int
"""
self._lock.acquire()