diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2011-08-09 00:46:12 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2011-12-03 23:04:47 +0000 |
commit | b69163b57d4b8530c5ab4ac5d40dfb0c0969c045 (patch) | |
tree | 82ab41ef97dc7aa15ea87697bc20e392677ddef9 | |
parent | 006624f5689e6911597d5290822c7a6a8bd00509 (diff) | |
download | deluge-b69163b57d4b8530c5ab4ac5d40dfb0c0969c045.tar.gz deluge-b69163b57d4b8530c5ab4ac5d40dfb0c0969c045.tar.bz2 deluge-b69163b57d4b8530c5ab4ac5d40dfb0c0969c045.zip |
Fix #1828 : Auth issue with args passed to console
-rw-r--r-- | deluge/ui/console/commander.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deluge/ui/console/commander.py b/deluge/ui/console/commander.py index 21680c06f..2b51da893 100644 --- a/deluge/ui/console/commander.py +++ b/deluge/ui/console/commander.py @@ -137,10 +137,14 @@ class Commander: print "Could not connect to: %s:%d\n %s"%(host,port,rm) self.do_command("quit") + if not username and host in ("127.0.0.1", "localhost"): + # No username was provided and it's the localhost, so we can try + # to grab the credentials from the auth file. + from deluge.ui.common import get_localhost_auth + username, password = get_localhost_auth() if host: d = client.connect(host,port,username,password) else: d = client.connect() d.addCallback(on_connect) d.addErrback(on_connect_fail) - |