[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.
This commit is contained in:
Robey Pointer 2004-09-05 07:37:40 +00:00
parent aba7e37a38
commit 6cef2f1259
1 changed files with 2 additions and 3 deletions

View File

@ -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))