This function is going to need the re module for more complex tasks
shortly, so go ahead and start using it for this too.
if alert:
if verbose: return alert
else:
if alert:
if verbose: return alert
else:
- if alert.find("\nNational Weather Service") == -1:
- muted = False
- else:
+ import re
+ if re.search(r"\nNational Weather Service", alert):
lines = alert.split("\n")
import time
# TODO: make this offset configurable
lines = alert.split("\n")
import time
# TODO: make this offset configurable