From 57bc6728af8f8cb2bf2a0250d1261df6f916f8d4 Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Sat, 29 Apr 2006 19:40:43 -0700 Subject: [PATCH] [project @ robey@lag.net-20060430024043-e4391438febc9bf2] check for None channel and display error --- demos/forward.py | 4 ++++ 1 file changed, 4 insertions(+) mode change 100755 => 100644 demos/forward.py diff --git a/demos/forward.py b/demos/forward.py old mode 100755 new mode 100644 index f91e969..4affcfa --- 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: