summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2024-09-14 18:50:39 -0400
committerJeff Forcier <jeff@bitprophet.org>2024-09-14 18:50:39 -0400
commit82e035c481451f05007ac3051738062e2ba62961 (patch)
tree6d093c70a7a23dcf625f01c28148f3b983df530d
parent01fb98f69c78f8fd92fea38f4b40c4f0b9d1a757 (diff)
Fix silly little bug in Channel tests
Was causing PytestUnraisableExceptionWarning
-rw-r--r--paramiko/channel.py2
-rw-r--r--sites/www/changelog.rst3
2 files changed, 4 insertions, 1 deletions
diff --git a/paramiko/channel.py b/paramiko/channel.py
index 2757450b..25326cab 100644
--- a/paramiko/channel.py
+++ b/paramiko/channel.py
@@ -961,7 +961,7 @@ class Channel(ClosingContextManager):
m = self._send_eof()
finally:
self.lock.release()
- if m is not None:
+ if m is not None and self.transport is not None:
self.transport._send_user_message(m)
def shutdown_read(self):
diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst
index d75e05a2..33d7a1c7 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -2,6 +2,9 @@
Changelog
=========
+- :bug:`-` Check for ``None`` transport members inside
+ `~paramiko.channel.Channel` when closing the channel; this likely doesn't
+ come up much in the real world, but was causing warnings in the test suite.
- :release:`3.3.2 <2024-08-11>`
- :bug:`2419` (fixed in :issue:`2421`) Massage our import of the TripleDES
cipher to support Cryptography >=43; this should prevent