Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misdetection on detect_cycles #544

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/rosdep2/dependency_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def detect_cycles(self, rosdep_key, traveled_keys):
:raises: :exc:`AssertionError` if the rosdep_key is in the traveled keys, indicating a cycle has occurred.
"""
assert rosdep_key not in traveled_keys, "A cycle in the dependency graph occurred with key `%s`." % rosdep_key
traveled_keys.append(rosdep_key)
new_traveled_keys = traveled_keys + rosdep_key
for dependency in self[rosdep_key]['dependencies']:
self.detect_cycles(dependency, traveled_keys)
self.detect_cycles(dependency, new_traveled_keys)

def validate(self):
"""
Expand Down