mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
fixed password.fetch option not using environment
the '_strategy_command' in 'fetchparams.cli' did not expand the path of every argument, but only the first one (being the command to be executed). i fixed the '_strategy_command' function to apply the 'expand_path' function to every member of the commands list.
This commit is contained in:
parent
cfd5af832a
commit
c254b4ad1d
2 changed files with 5 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ In alphabetical order:
|
||||||
- Markus Unterwaditzer
|
- Markus Unterwaditzer
|
||||||
- Michael Adler
|
- Michael Adler
|
||||||
- Thomas Weißschuh
|
- Thomas Weißschuh
|
||||||
|
- Witcher01
|
||||||
|
|
||||||
Special thanks goes to:
|
Special thanks goes to:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,10 @@ def _fetch_value(opts, key):
|
||||||
def _strategy_command(*command):
|
def _strategy_command(*command):
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
command = (expand_path(command[0]),) + command[1:]
|
# normalize path of every path member
|
||||||
|
# if there is no path specified then nothing will happen
|
||||||
|
command = map(expand_path, command)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
stdout = subprocess.check_output(command, universal_newlines=True)
|
stdout = subprocess.check_output(command, universal_newlines=True)
|
||||||
return stdout.strip("\n")
|
return stdout.strip("\n")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue