diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/vyos/configdep.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/vyos/configdep.py b/python/vyos/configdep.py index 8a28811eb..64727d355 100644 --- a/python/vyos/configdep.py +++ b/python/vyos/configdep.py @@ -107,6 +107,13 @@ def call_dependents(): f = l.pop(0) f() +def called_as_dependent() -> bool: + st = stack()[1:] + for f in st: + if f.filename == __file__: + return True + return False + def graph_from_dependency_dict(d: dict) -> dict: g = {} for k in list(d): |