Exemplo n.º 1
0
 def newest_alarm(self):
     entry = self.newest_alarm_entry()
     if not entry:
         return None
     alarm = Alarm()
     alarm.from_dictionary(entry)
     return alarm
Exemplo n.º 2
0
 def newest_n_alarms(self,count):
     alarms = []
     configs = self.newest_n_alarm_entries(count)
     for config in configs:
         alarm = Alarm()
         alarm.from_dictionary(config)
         alarms.append(alarm)
     return alarms