From 333dd249b01b059f8ecd887a515dd964bfbf7adb Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 21 Feb 2014 16:37:16 -0800 Subject: [PATCH] Start in on the SFTP section --- paramiko/sftp_attr.py | 4 ++-- paramiko/sftp_client.py | 18 +++++++++--------- sites/docs/api/sftp.rst | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/paramiko/sftp_attr.py b/paramiko/sftp_attr.py index 37cdeba..b804039 100644 --- a/paramiko/sftp_attr.py +++ b/paramiko/sftp_attr.py @@ -26,8 +26,8 @@ class SFTPAttributes (object): """ Representation of the attributes of a file (or proxied file) for SFTP in client or server mode. It attemps to mirror the object returned by - ``os.stat`` as closely as possible, so it may have the following fields, - with the same meanings as those returned by an ``os.stat`` object: + `os.stat` as closely as possible, so it may have the following fields, + with the same meanings as those returned by an `os.stat` object: - st_size - st_uid - st_gid diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py index d1d6223..b9d8744 100644 --- a/paramiko/sftp_client.py +++ b/paramiko/sftp_client.py @@ -16,9 +16,6 @@ # along with Paramiko; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -""" -Client-mode SFTP support. -""" from binascii import hexlify import errno @@ -49,12 +46,13 @@ def _to_unicode(s): return s -class SFTPClient (BaseSFTP): +class SFTPClient(BaseSFTP): """ - SFTP client object. ``SFTPClient`` is used to open an sftp session across - an open ssh `.Transport` and do remote file operations. + SFTP client object. + + Used to open an SFTP session across an open SSH `.Transport` and perform + remote file operations. """ - def __init__(self, sock): """ Create an SFTP client from an existing `.Channel`. The channel @@ -782,6 +780,8 @@ class SFTPClient (BaseSFTP): return self._cwd + '/' + path -class SFTP (SFTPClient): - "an alias for `.SFTPClient` for backwards compatability" +class SFTP(SFTPClient): + """ + An alias for `.SFTPClient` for backwards compatability. + """ pass diff --git a/sites/docs/api/sftp.rst b/sites/docs/api/sftp.rst index 2eedecf..c016d73 100644 --- a/sites/docs/api/sftp.rst +++ b/sites/docs/api/sftp.rst @@ -2,9 +2,9 @@ SFTP ==== .. automodule:: paramiko.sftp -.. automodule:: paramiko.sftp_attr .. automodule:: paramiko.sftp_client +.. automodule:: paramiko.sftp_server +.. automodule:: paramiko.sftp_attr .. automodule:: paramiko.sftp_file .. automodule:: paramiko.sftp_handle -.. automodule:: paramiko.sftp_server .. automodule:: paramiko.sftp_si