From b58f670694ad13ba105d4fd0e8de048377bbbff9 Mon Sep 17 00:00:00 2001 From: etomm Date: Sat, 15 Oct 2016 10:08:51 +0200 Subject: [PATCH] Handling Deluge empty password --- headphones/deluge.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/headphones/deluge.py b/headphones/deluge.py index f97063d3..6c105054 100644 --- a/headphones/deluge.py +++ b/headphones/deluge.py @@ -269,7 +269,8 @@ def _get_auth(): delugeweb_host = headphones.CONFIG.DELUGE_HOST delugeweb_cert = headphones.CONFIG.DELUGE_CERT delugeweb_password = headphones.CONFIG.DELUGE_PASSWORD - logger.debug('Deluge: Using password %s******%s' % (delugeweb_password[0], delugeweb_password[-1])) + if len(delugeweb_password) > 0: + logger.debug('Deluge: Using password %s******%s' % (delugeweb_password[0], delugeweb_password[-1])) if not delugeweb_host.startswith('http'): delugeweb_host = 'http://%s' % delugeweb_host