summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2004-09-05 07:37:40 +0000
committerRobey Pointer <robey@lag.net>2004-09-05 07:37:40 +0000
commit6cef2f12591f5384f92457aa8cc49e153348d07b (patch)
tree66d4168f2254199b8c360b9d0b4701260e91fb64
parentaba7e37a383fc3d7ffedc6d9e433f65223ac5fe2 (diff)
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-71]
remove redundant 'auth_complete' member remove the redundant 'auth_complete' field and just use 'authenticated' for both client and server mode. this makes the repr() string look correct in server mode instead of always claiming that the transport is un-auth'd.
-rw-r--r--paramiko/auth_transport.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/paramiko/auth_transport.py b/paramiko/auth_transport.py
index c1919cd3..958cd408 100644
--- a/paramiko/auth_transport.py
+++ b/paramiko/auth_transport.py
@@ -55,7 +55,6 @@ class Transport (BaseTransport):
# for server mode:
self.auth_username = None
self.auth_fail_count = 0
- self.auth_complete = 0
def __repr__(self):
out = '<paramiko.Transport at %s' % hex(id(self))
@@ -242,7 +241,7 @@ class Transport (BaseTransport):
m.add_boolean(0)
self._send_message(m)
return
- if self.auth_complete:
+ if self.authenticated:
# ignore
return
username = m.get_string()
@@ -308,7 +307,7 @@ class Transport (BaseTransport):
if result == AUTH_SUCCESSFUL:
self._log(DEBUG, 'Auth granted.')
m.add_byte(chr(MSG_USERAUTH_SUCCESS))
- self.auth_complete = 1
+ self.authenticated = True
else:
self._log(DEBUG, 'Auth rejected.')
m.add_byte(chr(MSG_USERAUTH_FAILURE))