Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
d2036ced
Commit
d2036ced
authored
Mar 12, 2014
by
Michael DeHaan
Committed by
Michael DeHaan
Mar 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more run_command updates.
parent
4392246b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
library/packaging/portinstall
+3
-3
library/source_control/bzr
+1
-2
No files found.
library/packaging/portinstall
View file @
d2036ced
...
@@ -71,7 +71,7 @@ def query_package(module, name):
...
@@ -71,7 +71,7 @@ def query_package(module, name):
if
pkg_info_path
:
if
pkg_info_path
:
pkgng
=
False
pkgng
=
False
pkg_glob_path
=
module
.
get_bin_path
(
'pkg_glob'
,
True
)
pkg_glob_path
=
module
.
get_bin_path
(
'pkg_glob'
,
True
)
rc
,
out
,
err
=
module
.
run_command
(
"
%
s -e `pkg_glob
%
s`"
%
(
pkg_info_path
,
name
)
)
rc
,
out
,
err
=
module
.
run_command
(
"
%
s -e `pkg_glob
%
s`"
%
(
pkg_info_path
,
pipes
.
quote
(
name
),
use_unsafe_shell
=
True
)
else
:
else
:
pkgng
=
True
pkgng
=
True
pkg_info_path
=
module
.
get_bin_path
(
'pkg'
,
True
)
pkg_info_path
=
module
.
get_bin_path
(
'pkg'
,
True
)
...
@@ -128,11 +128,11 @@ def remove_packages(module, packages):
...
@@ -128,11 +128,11 @@ def remove_packages(module, packages):
if
not
query_package
(
module
,
package
):
if
not
query_package
(
module
,
package
):
continue
continue
rc
,
out
,
err
=
module
.
run_command
(
"
%
s `
%
s
%
s`"
%
(
pkg_delete_path
,
pkg_glob_path
,
p
ackage
)
)
rc
,
out
,
err
=
module
.
run_command
(
"
%
s `
%
s
%
s`"
%
(
pkg_delete_path
,
pkg_glob_path
,
p
ipes
.
quote
(
package
)),
use_unsafe_shell
=
True
)
if
query_package
(
module
,
package
):
if
query_package
(
module
,
package
):
name_without_digits
=
re
.
sub
(
'[0-9]'
,
''
,
package
)
name_without_digits
=
re
.
sub
(
'[0-9]'
,
''
,
package
)
rc
,
out
,
err
=
module
.
run_command
(
"
%
s `
%
s
%
s`"
%
(
pkg_delete_path
,
pkg_glob_path
,
name_without_digits
)
)
rc
,
out
,
err
=
module
.
run_command
(
"
%
s `
%
s
%
s`"
%
(
pkg_delete_path
,
pkg_glob_path
,
pipes
.
quote
(
lame_without_digits
)),
use_unsafe_shell
=
True
)
if
query_package
(
module
,
package
):
if
query_package
(
module
,
package
):
module
.
fail_json
(
msg
=
"failed to remove
%
s:
%
s"
%
(
package
,
out
))
module
.
fail_json
(
msg
=
"failed to remove
%
s:
%
s"
%
(
package
,
out
))
...
...
library/source_control/bzr
View file @
d2036ced
...
@@ -76,8 +76,7 @@ class Bzr(object):
...
@@ -76,8 +76,7 @@ class Bzr(object):
self
.
bzr_path
=
bzr_path
self
.
bzr_path
=
bzr_path
def
_command
(
self
,
args_list
,
cwd
=
None
,
**
kwargs
):
def
_command
(
self
,
args_list
,
cwd
=
None
,
**
kwargs
):
(
rc
,
out
,
err
)
=
self
.
module
.
run_command
(
(
rc
,
out
,
err
)
=
self
.
module
.
run_command
([
self
.
bzr_path
]
+
args_list
,
cwd
=
cwd
,
**
kwargs
)
[
self
.
bzr_path
]
+
args_list
,
cwd
=
cwd
,
**
kwargs
)
return
(
rc
,
out
,
err
)
return
(
rc
,
out
,
err
)
def
get_version
(
self
):
def
get_version
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment