summaryrefslogtreecommitdiffhomepage
path: root/demos
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2006-04-29 19:40:43 -0700
committerRobey Pointer <robey@lag.net>2006-04-29 19:40:43 -0700
commit57bc6728af8f8cb2bf2a0250d1261df6f916f8d4 (patch)
tree3806b7f4b758cf68c778b99b9e1c723d5829b96a /demos
parente646d0ee4cab2b4ec77004f1eacdc5854af581e9 (diff)
[project @ robey@lag.net-20060430024043-e4391438febc9bf2]
check for None channel and display error
Diffstat (limited to 'demos')
-rw-r--r--[-rwxr-xr-x]demos/forward.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/demos/forward.py b/demos/forward.py
index f91e969e..4affcfaf 100755..100644
--- a/demos/forward.py
+++ b/demos/forward.py
@@ -60,6 +60,10 @@ class Handler (SocketServer.BaseRequestHandler):
self.chain_port,
repr(e)))
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.')
while True: