mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Document password_command behavior in keyring.rst
This commit is contained in:
parent
0e11d2ea0e
commit
60a7778cea
2 changed files with 5 additions and 1 deletions
|
|
@ -15,6 +15,10 @@ Custom command
|
||||||
A custom command/binary can be specified to retrieve the password for a
|
A custom command/binary can be specified to retrieve the password for a
|
||||||
username/hostname combination. See :ref:`general_config`.
|
username/hostname combination. See :ref:`general_config`.
|
||||||
|
|
||||||
|
.. versionchanged:: 0.6.0
|
||||||
|
|
||||||
|
Setting a custom command now disables all other methods.
|
||||||
|
|
||||||
netrc
|
netrc
|
||||||
=====
|
=====
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ def _password_from_command(username, host):
|
||||||
try:
|
try:
|
||||||
stdout = subprocess.check_output(command + [username, host],
|
stdout = subprocess.check_output(command + [username, host],
|
||||||
universal_newlines=True)
|
universal_newlines=True)
|
||||||
return stdout.strip('\n') or None
|
return stdout.strip('\n')
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise exceptions.UserError('Failed to execute command: {}\n{}'.
|
raise exceptions.UserError('Failed to execute command: {}\n{}'.
|
||||||
format(' '.join(command), str(e)))
|
format(' '.join(command), str(e)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue