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
5bf9ea62
Commit
5bf9ea62
authored
Mar 26, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sure the shebang we inject into the module is a str
Fixes #8564
parent
e9c8e89c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
lib/ansible/module_common.py
+3
-1
No files found.
lib/ansible/module_common.py
View file @
5bf9ea62
...
...
@@ -26,6 +26,7 @@ from ansible import errors
from
ansible
import
utils
from
ansible
import
constants
as
C
from
ansible
import
__version__
from
asnible.utils.unicode
import
to_bytes
REPLACER
=
"#<<INCLUDE_ANSIBLE_MODULE_COMMON>>"
REPLACER_ARGS
=
"
\"
<<INCLUDE_ANSIBLE_MODULE_ARGS>>
\"
"
...
...
@@ -184,7 +185,8 @@ class ModuleReplacer(object):
interpreter_config
=
'ansible_
%
s_interpreter'
%
os
.
path
.
basename
(
interpreter
)
if
interpreter_config
in
inject
:
lines
[
0
]
=
shebang
=
"#!
%
s
%
s"
%
(
inject
[
interpreter_config
],
" "
.
join
(
args
[
1
:]))
interpreter
=
to_bytes
(
inject
[
interpreter_config
],
errors
=
'strict'
)
lines
[
0
]
=
shebang
=
"#!
%
s
%
s"
%
(
interpreter
,
" "
.
join
(
args
[
1
:]))
module_data
=
"
\n
"
.
join
(
lines
)
return
(
module_data
,
module_style
,
shebang
)
...
...
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