Files
ha-core/homeassistant/util.py
Paulus Schoutsen e6bdded90c Rename root module
2013-09-21 18:02:52 -07:00

5 lines
199 B
Python

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