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
fbba0bb3
Commit
fbba0bb3
authored
Jan 14, 2014
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #5601 Do not append extra args when checking for pip command options
parent
2e1d92c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
library/packaging/pip
+2
-3
No files found.
library/packaging/pip
View file @
fbba0bb3
...
...
@@ -147,9 +147,8 @@ EXAMPLES = '''
def
_get_cmd_options
(
module
,
cmd
):
thiscmd
=
cmd
+
" --help"
rc
,
stdout
,
stderr
=
module
.
run_command
(
thiscmd
)
#import epdb; epdb.serve()
if
rc
!=
0
:
module
.
fail_json
(
msg
=
"Could not get
--help output from
%
s"
%
virtualenv
)
module
.
fail_json
(
msg
=
"Could not get
output from
%
s:
%
s"
%
(
thiscmd
,
stdout
+
stderr
)
)
words
=
stdout
.
strip
()
.
split
()
cmd_options
=
[
x
for
x
in
words
if
x
.
startswith
(
'--'
)
]
...
...
@@ -322,7 +321,7 @@ def main():
is_package
=
is_vcs
or
is_tar
or
is_local_path
# just a shortcut for bool
if
cmd_opts
is
None
:
cmd_opts
=
_get_cmd_options
(
module
,
cmd
)
cmd_opts
=
_get_cmd_options
(
module
,
'
%
s
%
s'
%
(
pip
,
state_map
[
state
])
)
if
not
is_package
and
state
!=
'absent'
and
use_mirrors
and
'--use-mirrors'
in
cmd_opts
:
cmd
+=
' --use-mirrors'
...
...
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