diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2018-05-29 15:18:24 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2018-05-29 15:18:34 -0700 |
commit | c091e756084ce017d8d872ffeaf95422f79140f1 (patch) | |
tree | 4c8c82399a6a21217f78ff36a90c3a355f6a0c23 /tests/stub_sftp.py | |
parent | 0bf3fa458deffe1306f226a7257ceda927ca9e8e (diff) |
Blacken under black 18.5b0
Diffstat (limited to 'tests/stub_sftp.py')
-rw-r--r-- | tests/stub_sftp.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/stub_sftp.py b/tests/stub_sftp.py index 170304ab..ffae635d 100644 --- a/tests/stub_sftp.py +++ b/tests/stub_sftp.py @@ -207,7 +207,7 @@ class StubSFTPServer(SFTPServerInterface): else: # compute relative to path abspath = os.path.join(os.path.dirname(path), target_path) - if abspath[:len(self.ROOT)] != self.ROOT: + if abspath[: len(self.ROOT)] != self.ROOT: # this symlink isn't going to work anyway -- just break it immediately target_path = "<error>" try: @@ -224,8 +224,8 @@ class StubSFTPServer(SFTPServerInterface): return SFTPServer.convert_errno(e.errno) # if it's absolute, remove the root if os.path.isabs(symlink): - if symlink[:len(self.ROOT)] == self.ROOT: - symlink = symlink[len(self.ROOT):] + if symlink[: len(self.ROOT)] == self.ROOT: + symlink = symlink[len(self.ROOT) :] if (len(symlink) == 0) or (symlink[0] != "/"): symlink = "/" + symlink else: |