d
This commit is contained in:
14
Utilities/platform/2/generation/isToggle.py
Normal file
14
Utilities/platform/2/generation/isToggle.py
Normal file
@@ -0,0 +1,14 @@
|
||||
def isToggle(name, structure):
|
||||
# Проверяем наличие `toggle` в свойствах канала ядра.
|
||||
if name in structure.core.pipes:
|
||||
props = structure.core.pipes[name]
|
||||
if "toggle" in props:
|
||||
return True
|
||||
|
||||
# Проверяем наличие `toggle` в свойствах канала сервиса.
|
||||
if name in structure.service.pipes:
|
||||
props = structure.service.pipes[name]
|
||||
if "toggle" in props:
|
||||
return True
|
||||
|
||||
return False
|
||||
Reference in New Issue
Block a user