summaryrefslogtreecommitdiff
path: root/paramiko/file.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-09-29 17:52:59 +0100
committerMichael Williamson <mike@zwobble.org>2014-09-07 18:35:52 +0100
commite0b323d7fb0d355bf7fcc469d3a24bd5a55f7ee4 (patch)
tree52dd4271bd26d476ae19937bf308451c836626e3 /paramiko/file.py
parentb14aedee595ba673d58e04014ff6be65963740da (diff)
downloadparamiko-e0b323d7fb0d355bf7fcc469d3a24bd5a55f7ee4.tar.gz
Turn BufferedFile into a context manager
Diffstat (limited to 'paramiko/file.py')
-rw-r--r--paramiko/file.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/paramiko/file.py b/paramiko/file.py
index 2238f0bf..09998829 100644
--- a/paramiko/file.py
+++ b/paramiko/file.py
@@ -19,8 +19,10 @@ from paramiko.common import linefeed_byte_value, crlf, cr_byte, linefeed_byte, \
cr_byte_value
from paramiko.py3compat import BytesIO, PY2, u, b, bytes_types
+from paramiko.util import ClosingContextManager
-class BufferedFile (object):
+
+class BufferedFile (ClosingContextManager):
"""
Reusable base class to implement Python-style file buffering around a
simpler stream.