diff options
author | Chris Rose <offline@offby1.net> | 2018-05-17 10:13:38 -0400 |
---|---|---|
committer | Chris Rose <offline@offby1.net> | 2018-05-17 10:13:38 -0400 |
commit | 7f2c35052183b400827d9949a68b41c90f90a32d (patch) | |
tree | fea4a1ec04b7ee3ced14d61e8b6cf3f479e22704 /paramiko/sftp_si.py | |
parent | 52551321a2297bdb966869fa719e584c868dd857 (diff) | |
download | paramiko-7f2c35052183b400827d9949a68b41c90f90a32d.tar.gz |
Blacken Paramiko on 2.4
Diffstat (limited to 'paramiko/sftp_si.py')
-rw-r--r-- | paramiko/sftp_si.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/paramiko/sftp_si.py b/paramiko/sftp_si.py index b43b582c..40dc561c 100644 --- a/paramiko/sftp_si.py +++ b/paramiko/sftp_si.py @@ -25,7 +25,7 @@ import sys from paramiko.sftp import SFTP_OP_UNSUPPORTED -class SFTPServerInterface (object): +class SFTPServerInterface(object): """ This class defines an interface for controlling the behavior of paramiko when using the `.SFTPServer` subsystem to provide an SFTP server. @@ -39,6 +39,7 @@ class SFTPServerInterface (object): All paths are in string form instead of unicode because not all SFTP clients & servers obey the requirement that paths be encoded in UTF-8. """ + def __init__(self, server, *largs, **kwargs): """ Create a new SFTPServerInterface object. This method does nothing by @@ -281,10 +282,10 @@ class SFTPServerInterface (object): if os.path.isabs(path): out = os.path.normpath(path) else: - out = os.path.normpath('/' + path) - if sys.platform == 'win32': + out = os.path.normpath("/" + path) + if sys.platform == "win32": # on windows, normalize backslashes to sftp/posix format - out = out.replace('\\', '/') + out = out.replace("\\", "/") return out def readlink(self, path): |