diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-11-07 09:30:13 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-11-07 09:30:13 -0800 |
commit | 0e0b2b87b547d97860ccf5962ad030df640b692f (patch) | |
tree | d811869c3a90858102dab749d7e586b5d0cc0de7 | |
parent | a2f5740feea682686df1f4b6eeac9de26cfeedd3 (diff) |
Rename an internal-only 'async' method kwarg for Python 3.7 compatibility.
Fixes #1108
-rw-r--r-- | paramiko/sftp_file.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/paramiko/sftp_file.py b/paramiko/sftp_file.py index b1c0f849..52f2bde8 100644 --- a/paramiko/sftp_file.py +++ b/paramiko/sftp_file.py @@ -65,15 +65,15 @@ class SFTPFile (BufferedFile): self._reqs = deque() def __del__(self): - self._close(async=True) + self._close(async_=True) def close(self): """ Close the file. """ - self._close(async=False) + self._close(async_=False) - def _close(self, async=False): + def _close(self, async_=False): # We allow double-close without signaling an error, because real # Python file objects do. However, we must protect against actually # sending multiple CMD_CLOSE packets, because after we close our @@ -88,7 +88,7 @@ class SFTPFile (BufferedFile): self.sftp._finish_responses(self) BufferedFile.close(self) try: - if async: + if async_: # GC'd file handle could be called from an arbitrary thread # -- don't wait for a response self.sftp._async_request(type(None), CMD_CLOSE, self.handle) |