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
c42dbf80
Commit
c42dbf80
authored
Mar 19, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6586 from sivel/probline-logic-fix
Fix logic in process_common_errors for unbalanced quotes
parents
266123e5
2aaecc5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
lib/ansible/utils/__init__.py
+1
-1
test/units/TestUtils.py
+1
-2
No files found.
lib/ansible/utils/__init__.py
View file @
c42dbf80
...
@@ -424,7 +424,7 @@ Or:
...
@@ -424,7 +424,7 @@ Or:
match
=
True
match
=
True
elif
middle
.
startswith
(
'"'
)
and
not
middle
.
endswith
(
'"'
):
elif
middle
.
startswith
(
'"'
)
and
not
middle
.
endswith
(
'"'
):
match
=
True
match
=
True
if
len
(
middle
)
>
0
and
middle
[
0
]
in
[
'"'
,
"'"
]
and
middle
[
-
1
]
in
[
'"'
,
"'"
]
and
probline
.
count
(
"'"
)
>
2
or
probline
.
count
(
"'"
)
>
2
:
if
len
(
middle
)
>
0
and
middle
[
0
]
in
[
'"'
,
"'"
]
and
middle
[
-
1
]
in
[
'"'
,
"'"
]
and
probline
.
count
(
"'"
)
>
2
or
probline
.
count
(
'"'
)
>
2
:
unbalanced
=
True
unbalanced
=
True
if
match
:
if
match
:
msg
=
msg
+
"""
msg
=
msg
+
"""
...
...
test/units/TestUtils.py
View file @
c42dbf80
...
@@ -301,8 +301,7 @@ class TestUtils(unittest.TestCase):
...
@@ -301,8 +301,7 @@ class TestUtils(unittest.TestCase):
self
.
assertTrue
(
'same kind of quote'
in
ansible
.
utils
.
process_common_errors
(
''
,
"foo: '{{bar}}'baz"
,
6
))
self
.
assertTrue
(
'same kind of quote'
in
ansible
.
utils
.
process_common_errors
(
''
,
"foo: '{{bar}}'baz"
,
6
))
# unbalanced
# unbalanced
# The first test fails and is commented out for now, logic is wrong and the test fails
self
.
assertTrue
(
'We could be wrong'
in
ansible
.
utils
.
process_common_errors
(
''
,
'foo: "bad" "wolf"'
,
6
))
#self.assertTrue('We could be wrong' in ansible.utils.process_common_errors('', 'foo: "bad" "wolf"', 6))
self
.
assertTrue
(
'We could be wrong'
in
ansible
.
utils
.
process_common_errors
(
''
,
"foo: 'bad' 'wolf'"
,
6
))
self
.
assertTrue
(
'We could be wrong'
in
ansible
.
utils
.
process_common_errors
(
''
,
"foo: 'bad' 'wolf'"
,
6
))
...
...
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