mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 07:58:38 +00:00
[#2832] [UI] Skip blank lines in auth file
This commit is contained in:
parent
5590c31ace
commit
f221ae53eb
1 changed files with 4 additions and 3 deletions
|
@ -410,10 +410,11 @@ def get_localhost_auth():
|
||||||
auth_file = deluge.configmanager.get_config_dir("auth")
|
auth_file = deluge.configmanager.get_config_dir("auth")
|
||||||
if os.path.exists(auth_file):
|
if os.path.exists(auth_file):
|
||||||
for line in open(auth_file):
|
for line in open(auth_file):
|
||||||
if line.startswith("#"):
|
|
||||||
# This is a comment line
|
|
||||||
continue
|
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
if line.startswith("#") or not line:
|
||||||
|
# This is a comment or blank line
|
||||||
|
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