aboutsummaryrefslogtreecommitdiffstats
path: root/ssh.py
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-18 14:53:34 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-18 14:53:34 -0400
commit462bab0b31664b64c94c7cb7d0d0ffe445eacdf2 (patch)
tree88252be086f7f6c56a3cd51ba64562374279b6e9 /ssh.py
parentefb2eb6decd52cbca7aec073de9d7550ba63d16f (diff)
downloadpython-termcast-server-462bab0b31664b64c94c7cb7d0d0ffe445eacdf2.tar.gz
python-termcast-server-462bab0b31664b64c94c7cb7d0d0ffe445eacdf2.zip
don't throw an exception if the ssh connection times out
Diffstat (limited to 'ssh.py')
-rw-r--r--ssh.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ssh.py b/ssh.py
index 56074fa..1497a89 100644
--- a/ssh.py
+++ b/ssh.py
@@ -26,6 +26,9 @@ class Connection(object):
self.server = Server()
self.transport.start_server(server=self.server)
self.chan = self.transport.accept(10)
+ if self.chan is None:
+ return
+
self.server.pty_event.wait()
while True: