Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def dismiss_all(self):
databases.protection.block()
group = databases.memory.get_next_history_group()
for alarm in tuple(self.alarms.keys()):
self.alarms[alarm].action(group=group, mode='dismiss')
databases.protection.release()