[#2832] [UI] Skip blank lines in auth file

This commit is contained in:
Calum Lind 2016-05-09 16:40:02 +01:00
parent 5590c31ace
commit f221ae53eb
1 changed files with 4 additions and 3 deletions

View File

@ -410,10 +410,11 @@ def get_localhost_auth():
auth_file = deluge.configmanager.get_config_dir("auth")
if os.path.exists(auth_file):
for line in open(auth_file):
if line.startswith("#"):
# This is a comment line
continue
line = line.strip()
if line.startswith("#") or not line:
# This is a comment or blank line
continue
try:
lsplit = line.split(":")
except Exception, e: