mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
[#2832] [UI] Skip blank lines in auth file
This commit is contained in:
parent
1fb9960168
commit
416fb5e1e3
1 changed files with 4 additions and 3 deletions
|
@ -415,11 +415,12 @@ def get_localhost_auth():
|
||||||
|
|
||||||
with open(auth_file) as auth:
|
with open(auth_file) as auth:
|
||||||
for line in auth:
|
for line in auth:
|
||||||
if line.startswith("#"):
|
line = line.strip()
|
||||||
# This is a comment line
|
if line.startswith("#") or not line:
|
||||||
|
# This is a comment or blank line
|
||||||
continue
|
continue
|
||||||
|
|
||||||
lsplit = line.strip().split(":")
|
lsplit = line.split(":")
|
||||||
|
|
||||||
if len(lsplit) == 2:
|
if len(lsplit) == 2:
|
||||||
username, password = lsplit
|
username, password = lsplit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue