mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 19:44:52 +00:00
Fix #1828 : Auth issue with args passed to console
This commit is contained in:
parent
006624f568
commit
b69163b57d
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue