mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
commit
8e775ab963
@ -6,7 +6,6 @@ Subversion SCM
|
|||||||
# Import python libs
|
# Import python libs
|
||||||
import re
|
import re
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
|
||||||
|
|
||||||
# Import salt libs
|
# Import salt libs
|
||||||
from salt import utils, exceptions
|
from salt import utils, exceptions
|
||||||
@ -58,15 +57,15 @@ def _run_svn(cmd, cwd, user, username, password, opts, **kwargs):
|
|||||||
kwargs
|
kwargs
|
||||||
Additional options to pass to the run-cmd
|
Additional options to pass to the run-cmd
|
||||||
'''
|
'''
|
||||||
cmd = 'svn --non-interactive {0} '.format(cmd)
|
cmd = ['svn', '--non-interactive', cmd]
|
||||||
if username:
|
if username:
|
||||||
opts += ('--username', username)
|
opts.extend(['--username', username])
|
||||||
if password:
|
if password:
|
||||||
opts += ('--password', '\'{0}\''.format(password))
|
opts.extend(['--password', password])
|
||||||
if opts:
|
if opts:
|
||||||
cmd += subprocess.list2cmdline(opts)
|
cmd.extend(opts)
|
||||||
|
|
||||||
result = __salt__['cmd.run_all'](cmd, cwd=cwd, runas=user, **kwargs)
|
result = __salt__['cmd.run_all'](cmd, python_shell=False, cwd=cwd, runas=user, **kwargs)
|
||||||
|
|
||||||
retcode = result['retcode']
|
retcode = result['retcode']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user