mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
dpkg module python shell kwarg additions
This commit is contained in:
parent
842d345ad8
commit
d84e0412aa
@ -68,7 +68,7 @@ def list_pkgs(*packages):
|
||||
'''
|
||||
pkgs = {}
|
||||
cmd = 'dpkg -l {0}'.format(' '.join(packages))
|
||||
out = __salt__['cmd.run_all'](cmd)
|
||||
out = __salt__['cmd.run_all'](cmd, python_shell=False)
|
||||
if out['retcode'] != 0:
|
||||
msg = 'Error: ' + out['stderr']
|
||||
log.error(msg)
|
||||
@ -100,7 +100,7 @@ def file_list(*packages):
|
||||
ret = set([])
|
||||
pkgs = {}
|
||||
cmd = 'dpkg -l {0}'.format(' '.join(packages))
|
||||
out = __salt__['cmd.run_all'](cmd)
|
||||
out = __salt__['cmd.run_all'](cmd, python_shell=False)
|
||||
if out['retcode'] != 0:
|
||||
msg = 'Error: ' + out['stderr']
|
||||
log.error(msg)
|
||||
@ -117,7 +117,7 @@ def file_list(*packages):
|
||||
for pkg in pkgs:
|
||||
files = []
|
||||
cmd = 'dpkg -L {0}'.format(pkg)
|
||||
for line in __salt__['cmd.run'](cmd).splitlines():
|
||||
for line in __salt__['cmd.run'](cmd, python_shell=False).splitlines():
|
||||
files.append(line)
|
||||
fileset = set(files)
|
||||
ret = ret.union(fileset)
|
||||
@ -142,7 +142,7 @@ def file_dict(*packages):
|
||||
ret = {}
|
||||
pkgs = {}
|
||||
cmd = 'dpkg -l {0}'.format(' '.join(packages))
|
||||
out = __salt__['cmd.run_all'](cmd)
|
||||
out = __salt__['cmd.run_all'](cmd, python_shell=False)
|
||||
if out['retcode'] != 0:
|
||||
msg = 'Error: ' + out['stderr']
|
||||
log.error(msg)
|
||||
@ -159,7 +159,7 @@ def file_dict(*packages):
|
||||
for pkg in pkgs:
|
||||
files = []
|
||||
cmd = 'dpkg -L {0}'.format(pkg)
|
||||
for line in __salt__['cmd.run'](cmd).splitlines():
|
||||
for line in __salt__['cmd.run'](cmd, python_shell=False).splitlines():
|
||||
files.append(line)
|
||||
ret[pkg] = files
|
||||
return {'errors': errors, 'packages': ret}
|
||||
|
Loading…
Reference in New Issue
Block a user