mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 12:34:43 +00:00
Strip out new lines when reading auth file
This commit is contained in:
parent
18f9165ba6
commit
6f7231f0ca
@ -132,9 +132,8 @@ def get_localhost_auth_uri(uri):
|
||||
u = urlparse.urlsplit(uri)
|
||||
for line in open(auth_file):
|
||||
try:
|
||||
username, password = line.split(":")
|
||||
except ValueError, e:
|
||||
log.error("Error with auth entry %s", line)
|
||||
username, password = line.strip().split(":")
|
||||
except ValueError:
|
||||
continue
|
||||
|
||||
if username == "localclient":
|
||||
|
Loading…
x
Reference in New Issue
Block a user