check for None channel and display error
This commit is contained in:
Robey Pointer 2006-04-29 19:40:43 -07:00
parent e646d0ee4c
commit 57bc6728af
1 changed files with 4 additions and 0 deletions

4
demos/forward.py Executable file → Normal file
View File

@ -60,6 +60,10 @@ class Handler (SocketServer.BaseRequestHandler):
self.chain_port, self.chain_port,
repr(e))) repr(e)))
return return
if chan is None:
verbose('Incoming request to %s:%d was rejected by the SSH server.' %
(self.chain_host, self.chain_port))
return
verbose('Connected! Tunnel open.') verbose('Connected! Tunnel open.')
while True: while True: