Skip to content

Commit 181e8ee

Browse files
Check specifically for cycle errors
1 parent 2801973 commit 181e8ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

datadog_sync/utils/resource_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import re
88
import logging
99
from copy import deepcopy
10-
from graphlib import TopologicalSorter
10+
from graphlib import TopologicalSorter, CycleError
1111
from dateutil.parser import parse
1212

1313
from deepdiff import DeepDiff
@@ -277,7 +277,7 @@ def detect_circular_dependencies(graph: Dict[Tuple[str, str], Set[Tuple[str, str
277277
sorter.prepare()
278278
# If prepare() succeeds, no cycles
279279
return None
280-
except Exception:
280+
except CycleError:
281281
# Cycle detected - try to find it using DFS
282282
visited = set()
283283
path = []

0 commit comments

Comments
 (0)