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
12edbfeb
Commit
12edbfeb
authored
Sep 01, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12177 from mgedmin/py3k
Make combine_vars() compatible with Python 3
parents
66c3461f
54dbfba8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
lib/ansible/utils/vars.py
+3
-1
lib/ansible/vars/__init__.py
+3
-1
No files found.
lib/ansible/utils/vars.py
View file @
12edbfeb
...
...
@@ -32,7 +32,9 @@ def combine_vars(a, b):
if
C
.
DEFAULT_HASH_BEHAVIOUR
==
"merge"
:
return
merge_hash
(
a
,
b
)
else
:
return
dict
(
a
.
items
()
+
b
.
items
())
result
=
a
.
copy
()
result
.
update
(
b
)
return
result
def
merge_hash
(
a
,
b
):
''' recursively merges hash b into a
...
...
lib/ansible/vars/__init__.py
View file @
12edbfeb
...
...
@@ -121,7 +121,9 @@ class VariableManager:
if
C
.
DEFAULT_HASH_BEHAVIOUR
==
"merge"
:
return
self
.
_merge_dicts
(
a
,
b
)
else
:
return
dict
(
a
.
items
()
+
b
.
items
())
result
=
a
.
copy
()
result
.
update
(
b
)
return
result
def
_merge_dicts
(
self
,
a
,
b
):
'''
...
...
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