diff options
author | Robey Pointer <robey@lag.net> | 2003-12-27 02:03:44 +0000 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2003-12-27 02:03:44 +0000 |
commit | eb4c279ec4392d23c5dd7271458299fb3196f8d4 (patch) | |
tree | 1affcf54d85bfecc8bcb649b4d7058804df490d3 | |
parent | 877cd974b8182d26fa76d566072917ea67b64e67 (diff) |
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-15]
fix up new paramiko/ folder.
moved SSHException to a new file (ssh_exception.py) and turned paramiko.py
into an __init__.py file. i'm still not entirely sure how this normally
works, so i may have done something wrong, but it's supposed to work the
same as before.
-rw-r--r-- | paramiko/__init__.py | 20 | ||||
-rw-r--r-- | paramiko/auth_transport.py | 2 | ||||
-rw-r--r-- | paramiko/channel.py | 2 | ||||
-rw-r--r-- | paramiko/dsskey.py | 2 | ||||
-rw-r--r-- | paramiko/kex_gex.py | 2 | ||||
-rw-r--r-- | paramiko/kex_group1.py | 2 | ||||
-rw-r--r-- | paramiko/ssh_exception.py | 4 | ||||
-rw-r--r-- | paramiko/transport.py | 2 |
8 files changed, 30 insertions, 6 deletions
diff --git a/paramiko/__init__.py b/paramiko/__init__.py new file mode 100644 index 00000000..e6d5e9fa --- /dev/null +++ b/paramiko/__init__.py @@ -0,0 +1,20 @@ + +import sys + +if (sys.version_info[0] < 2) or ((sys.version_info[0] == 2) and (sys.version_info[1] < 3)): + raise RuntimeError('You need python 2.3 for this module.') + + +__author__ = "Robey Pointer <robey@lag.net>" +__date__ = "10 Nov 2003" +__version__ = "0.1-charmander" +__credits__ = "Huzzah!" + + +from auth_transport import Transport +from channel import Channel +from rsakey import RSAKey +from dsskey import DSSKey +from util import hexify + +__all__ = [ 'Transport', 'Channel', 'RSAKey', 'DSSKey', 'hexify' ] diff --git a/paramiko/auth_transport.py b/paramiko/auth_transport.py index 854b3586..23f2d02c 100644 --- a/paramiko/auth_transport.py +++ b/paramiko/auth_transport.py @@ -4,7 +4,7 @@ from transport import BaseTransport from transport import MSG_SERVICE_REQUEST, MSG_SERVICE_ACCEPT, MSG_USERAUTH_REQUEST, MSG_USERAUTH_FAILURE, \ MSG_USERAUTH_SUCCESS, MSG_USERAUTH_BANNER from message import Message -from paramiko import SSHException +from ssh_exception import SSHException from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL DISCONNECT_SERVICE_NOT_AVAILABLE, DISCONNECT_AUTH_CANCELLED_BY_USER, \ diff --git a/paramiko/channel.py b/paramiko/channel.py index fa0ff7c8..43ddcd16 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -1,5 +1,5 @@ from message import Message -from paramiko import SSHException +from ssh_exception import SSHException from transport import MSG_CHANNEL_REQUEST, MSG_CHANNEL_CLOSE, MSG_CHANNEL_WINDOW_ADJUST, MSG_CHANNEL_DATA, \ MSG_CHANNEL_EOF, MSG_CHANNEL_SUCCESS, MSG_CHANNEL_FAILURE diff --git a/paramiko/dsskey.py b/paramiko/dsskey.py index a5e5c9a1..35d8a8d1 100644 --- a/paramiko/dsskey.py +++ b/paramiko/dsskey.py @@ -1,7 +1,7 @@ #!/usr/bin/python import base64 -from paramiko import SSHException +from ssh_exception import SSHException from message import Message from transport import MSG_USERAUTH_REQUEST from util import inflate_long, deflate_long diff --git a/paramiko/kex_gex.py b/paramiko/kex_gex.py index 19bc699a..f1b8058d 100644 --- a/paramiko/kex_gex.py +++ b/paramiko/kex_gex.py @@ -6,7 +6,7 @@ from message import Message from util import inflate_long, deflate_long, generate_prime, bit_length -from paramiko import SSHException +from ssh_exception import SSHException from transport import MSG_NEWKEYS from Crypto.Hash import SHA from Crypto.Util import number diff --git a/paramiko/kex_group1.py b/paramiko/kex_group1.py index 00988b2a..a29c79d0 100644 --- a/paramiko/kex_group1.py +++ b/paramiko/kex_group1.py @@ -5,7 +5,7 @@ # "g" generator. from message import Message, inflate_long -from paramiko import SSHException +from ssh_exception import SSHException from transport import MSG_NEWKEYS from Crypto.Hash import SHA from logging import DEBUG, INFO, WARNING, ERROR, CRITICAL diff --git a/paramiko/ssh_exception.py b/paramiko/ssh_exception.py new file mode 100644 index 00000000..b6e18467 --- /dev/null +++ b/paramiko/ssh_exception.py @@ -0,0 +1,4 @@ + +class SSHException(Exception): + pass + diff --git a/paramiko/transport.py b/paramiko/transport.py index a646b58f..6bbfa757 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -14,7 +14,6 @@ MSG_CHANNEL_OPEN, MSG_CHANNEL_OPEN_SUCCESS, MSG_CHANNEL_OPEN_FAILURE, \ import sys, os, string, threading, socket, logging, struct from message import Message from channel import Channel -from paramiko import SSHException from util import format_binary, safe_string, inflate_long, deflate_long, tb_strings from rsakey import RSAKey from dsskey import DSSKey @@ -53,6 +52,7 @@ except: randpool.randomize() + class BaseTransport(threading.Thread): ''' An SSH Transport attaches to a stream (usually a socket), negotiates an |