mirror of
https://github.com/elisspace/core.git
synced 2026-09-27 13:07:16 +00:00
11 lines
345 B
Python
11 lines
345 B
Python
EVENT_START = "start"
|
|
EVENT_SHUTDOWN = "shutdown"
|
|
|
|
def ensure_list(parameter):
|
|
return parameter if isinstance(parameter, list) else [parameter]
|
|
|
|
def matcher(subject, pattern):
|
|
""" Returns True if subject matches the pattern.
|
|
Pattern is either a list of allowed subjects or a '*'. """
|
|
return '*' in pattern or subject in pattern
|