From d5fe5371960ac28bc5ea8d6c037f57d3f23459ae Mon Sep 17 00:00:00 2001 From: Christian Geier Date: Thu, 27 Mar 2014 17:08:36 +0100 Subject: [PATCH] bugfix: auths may by None --- vdirsyncer/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vdirsyncer/utils.py b/vdirsyncer/utils.py index b5f9e66..9aa9aa0 100644 --- a/vdirsyncer/utils.py +++ b/vdirsyncer/utils.py @@ -84,9 +84,10 @@ def get_password(username, resource): except IOError: pass else: - sync_logger.debug("Read password for user {0} on {1} in .netrc".format( - auths[0], hostname)) - return auths[1] + if auths is not None: + sync_logger.debug("Read password for user {0} on {1} in .netrc".format( + auths[0], hostname)) + return auths[1] # keyring try: