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
ff251a0d
Commit
ff251a0d
authored
Jun 22, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Catch runtime errors due to recursion when calculating group depth
Fixes #7708
parent
97954ff6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
lib/ansible/inventory/group.py
+7
-3
No files found.
lib/ansible/inventory/group.py
View file @
ff251a0d
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
from
__future__
import
(
absolute_import
,
division
,
print_function
)
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
__metaclass__
=
type
from
ansible.errors
import
AnsibleError
from
ansible.utils.debug
import
debug
from
ansible.utils.debug
import
debug
class
Group
:
class
Group
:
...
@@ -99,9 +100,12 @@ class Group:
...
@@ -99,9 +100,12 @@ class Group:
def
_check_children_depth
(
self
):
def
_check_children_depth
(
self
):
for
group
in
self
.
child_groups
:
try
:
group
.
depth
=
max
([
self
.
depth
+
1
,
group
.
depth
])
for
group
in
self
.
child_groups
:
group
.
_check_children_depth
()
group
.
depth
=
max
([
self
.
depth
+
1
,
group
.
depth
])
group
.
_check_children_depth
()
except
RuntimeError
:
raise
AnsibleError
(
"The group named '
%
s' has a recursive dependency loop."
%
self
.
name
)
def
add_host
(
self
,
host
):
def
add_host
(
self
,
host
):
...
...
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