mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 04:54:23 +00:00
Fix #2201 : auth fails if auth file has extra newlines
This commit is contained in:
parent
294fc48bd1
commit
751bc317ea
@ -236,10 +236,10 @@ class AuthManager(component.Component):
|
||||
f = open(auth_file, "r").readlines()
|
||||
|
||||
for line in f:
|
||||
if line.startswith("#"):
|
||||
# This is a comment line
|
||||
continue
|
||||
line = line.strip()
|
||||
if line.startswith("#") or not line:
|
||||
# This line is a comment or empty
|
||||
continue
|
||||
try:
|
||||
lsplit = line.split(":")
|
||||
except Exception, e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user