From 11815d4d837314a51ebf919c1a61cb0f68a3c02b Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Mon, 10 Nov 2003 08:49:50 +0000 Subject: [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-9] rename secsh -> paramiko also, rename SecshException back to SSHException. sigh. :) --- demo_server.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'demo_server.py') diff --git a/demo_server.py b/demo_server.py index 273bb793..0c7ec518 100755 --- a/demo_server.py +++ b/demo_server.py @@ -1,10 +1,10 @@ #!/usr/bin/python import sys, os, socket, threading, logging, traceback -import secsh +import paramiko # setup logging -l = logging.getLogger("secsh") +l = logging.getLogger("paramiko") l.setLevel(logging.DEBUG) if len(l.handlers) == 0: f = open('demo_server.log', 'w') @@ -12,11 +12,11 @@ if len(l.handlers) == 0: lh.setFormatter(logging.Formatter('%(levelname)-.3s [%(asctime)s] %(name)s: %(message)s', '%Y%m%d:%H%M%S')) l.addHandler(lh) -host_key = secsh.RSAKey() +host_key = paramiko.RSAKey() host_key.read_private_key_file('demo_host_key') -class ServerTransport(secsh.Transport): +class ServerTransport(paramiko.Transport): def check_channel_request(self, kind, chanid): if kind == 'session': return ServerChannel(chanid) @@ -27,11 +27,11 @@ class ServerTransport(secsh.Transport): return self.AUTH_SUCCESSFUL return self.AUTH_FAILED -class ServerChannel(secsh.Channel): +class ServerChannel(paramiko.Channel): "Channel descendant that pretends to understand pty and shell requests" def __init__(self, chanid): - secsh.Channel.__init__(self, chanid) + paramiko.Channel.__init__(self, chanid) self.event = threading.Event() def check_pty_request(self, term, width, height, pixelwidth, pixelheight, modes): -- cgit v1.2.3