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 re
|
||||
import shlex
|
||||
import subprocess
|
||||
|
||||
# Import salt libs
|
||||
from salt import utils, exceptions
|
||||
@ -58,15 +57,15 @@ def _run_svn(cmd, cwd, user, username, password, opts, **kwargs):
|
||||
kwargs
|
||||
Additional options to pass to the run-cmd
|
||||
'''
|
||||
cmd = 'svn --non-interactive {0} '.format(cmd)
|
||||
cmd = ['svn', '--non-interactive', cmd]
|
||||
if username:
|
||||
opts += ('--username', username)
|
||||
opts.extend(['--username', username])
|
||||
if password:
|
||||
opts += ('--password', '\'{0}\''.format(password))
|
||||
opts.extend(['--password', password])
|
||||
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']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user