summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/transport.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py
index 50e78e7d..758ba37d 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -706,10 +706,8 @@ class Transport (threading.Thread):
@raise SSHException: if the request is rejected or the session ends
prematurely
"""
- chan = None
if not self.active:
- # don't bother trying to allocate a channel
- return None
+ raise SSHException('SSH session not active')
self.lock.acquire()
try:
chanid = self._next_channel()