mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Fix #2201 : auth fails if auth file has extra newlines
This commit is contained in:
parent
f2b2f98fac
commit
508b5aed8f
1 changed files with 3 additions and 3 deletions
|
@ -121,10 +121,10 @@ class AuthManager(component.Component):
|
||||||
f = open(auth_file, "r").readlines()
|
f = open(auth_file, "r").readlines()
|
||||||
|
|
||||||
for line in f:
|
for line in f:
|
||||||
if line.startswith("#"):
|
|
||||||
# This is a comment line
|
|
||||||
continue
|
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
if line.startswith("#") or not line:
|
||||||
|
# This line is a comment or empty
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
lsplit = line.split(":")
|
lsplit = line.split(":")
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue