diff options
author | Robey Pointer <robey@lag.net> | 2004-11-22 07:01:43 +0000 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2004-11-22 07:01:43 +0000 |
commit | fda92c6f4475494898aeb9f88972ce538b9ddb02 (patch) | |
tree | a75b0411018fdda4b303fab2aaee8b51ce7eb986 | |
parent | 73e8a134ce8ac05c30d6d269dda40b42ff4e8488 (diff) |
[project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-110]
fix Transport.get_username() to work in server mode too
whenever i split the 'username' field into username and auth_username,
i guess that made get_username() stop working for server mode (because the
username was stored in a different field). this should fix it.
-rw-r--r-- | paramiko/auth_transport.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/paramiko/auth_transport.py b/paramiko/auth_transport.py index ba0cbec8..2a6a1a29 100644 --- a/paramiko/auth_transport.py +++ b/paramiko/auth_transport.py @@ -97,7 +97,10 @@ class Transport (BaseTransport): @since: fearow """ - return self.username + if self.server_mode: + return self.auth_username + else: + return self.username def auth_publickey(self, username, key, event): """ |