Test Failed
Push — master ( 701a71...4aff4f )
by Antonio
04:10 queued 13s
created

build.utils.emit_event()   A

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nop 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
"""Utility functions."""
2
from kytos.core.events import KytosEvent
3
4
5
def emit_event(controller, name, **kwargs):
6
    """Send an event when something happens with an EVC."""
7
    event_name = f'kytos/mef_eline.{name}'
8
    event = KytosEvent(name=event_name, content=kwargs)
9
    controller.buffers.app.put(event)
10