mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 01:18:39 +00:00
Strip out new lines when reading auth file
This commit is contained in:
parent
18f9165ba6
commit
6f7231f0ca
1 changed files with 2 additions and 3 deletions
|
@ -132,9 +132,8 @@ def get_localhost_auth_uri(uri):
|
||||||
u = urlparse.urlsplit(uri)
|
u = urlparse.urlsplit(uri)
|
||||||
for line in open(auth_file):
|
for line in open(auth_file):
|
||||||
try:
|
try:
|
||||||
username, password = line.split(":")
|
username, password = line.strip().split(":")
|
||||||
except ValueError, e:
|
except ValueError:
|
||||||
log.error("Error with auth entry %s", line)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if username == "localclient":
|
if username == "localclient":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue