From 416fb5e1e3788f41a793185d10d32fa6eb4282a6 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Mon, 9 May 2016 16:37:02 +0100 Subject: [PATCH] [#2832] [UI] Skip blank lines in auth file --- deluge/ui/common.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deluge/ui/common.py b/deluge/ui/common.py index a4bf424bd..eeaeaa725 100644 --- a/deluge/ui/common.py +++ b/deluge/ui/common.py @@ -415,11 +415,12 @@ def get_localhost_auth(): with open(auth_file) as auth: for line in auth: - if line.startswith("#"): - # This is a comment line + line = line.strip() + if line.startswith("#") or not line: + # This is a comment or blank line continue - lsplit = line.strip().split(":") + lsplit = line.split(":") if len(lsplit) == 2: username, password = lsplit