diff --git a/docs/keyring.rst b/docs/keyring.rst index 4bf9585..0a4fd5f 100644 --- a/docs/keyring.rst +++ b/docs/keyring.rst @@ -15,6 +15,10 @@ Custom command A custom command/binary can be specified to retrieve the password for a username/hostname combination. See :ref:`general_config`. +.. versionchanged:: 0.6.0 + + Setting a custom command now disables all other methods. + netrc ===== diff --git a/vdirsyncer/utils/password.py b/vdirsyncer/utils/password.py index ec778b0..e13e26c 100644 --- a/vdirsyncer/utils/password.py +++ b/vdirsyncer/utils/password.py @@ -118,7 +118,7 @@ def _password_from_command(username, host): try: stdout = subprocess.check_output(command + [username, host], universal_newlines=True) - return stdout.strip('\n') or None + return stdout.strip('\n') except OSError as e: raise exceptions.UserError('Failed to execute command: {}\n{}'. format(' '.join(command), str(e)))