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
4ded8cb3
Commit
4ded8cb3
authored
Sep 18, 2012
by
Michael DeHaan
Committed by
Daniel Hokka Zakrisson
Sep 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change $FILE{} and $PIPE{} to $FILE() and $PIPE()
parent
cc948f33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/ansible/utils.py
+1
-1
test/TestUtils.py
+2
-2
No files found.
lib/ansible/utils.py
View file @
4ded8cb3
...
@@ -220,7 +220,7 @@ def varReplace(raw, vars):
...
@@ -220,7 +220,7 @@ def varReplace(raw, vars):
return
''
.
join
(
done
)
return
''
.
join
(
done
)
_FILEPIPECRE
=
re
.
compile
(
r"\$(?P<special>FILE|PIPE)\
{([^\}]+)\}
"
)
_FILEPIPECRE
=
re
.
compile
(
r"\$(?P<special>FILE|PIPE)\
(([^\}]+)\)
"
)
def
varReplaceFilesAndPipes
(
basedir
,
raw
):
def
varReplaceFilesAndPipes
(
basedir
,
raw
):
done
=
[]
# Completed chunks to return
done
=
[]
# Completed chunks to return
...
...
test/TestUtils.py
View file @
4ded8cb3
...
@@ -214,14 +214,14 @@ class TestUtils(unittest.TestCase):
...
@@ -214,14 +214,14 @@ class TestUtils(unittest.TestCase):
assert
res
==
u'hello oh great one'
assert
res
==
u'hello oh great one'
def
test_varReplace_include
(
self
):
def
test_varReplace_include
(
self
):
template
=
'hello $FILE
{world}
'
template
=
'hello $FILE
(world)
'
res
=
ansible
.
utils
.
template
(
"test"
,
template
,
{})
res
=
ansible
.
utils
.
template
(
"test"
,
template
,
{})
assert
res
==
u'hello world
\n
'
assert
res
==
u'hello world
\n
'
def
test_varReplace_include_script
(
self
):
def
test_varReplace_include_script
(
self
):
template
=
'hello $PIPE
{echo world}
'
template
=
'hello $PIPE
(echo world)
'
res
=
ansible
.
utils
.
template
(
"test"
,
template
,
{})
res
=
ansible
.
utils
.
template
(
"test"
,
template
,
{})
...
...
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