示例#1
0
 def check_hamster(self):
     """refresh hamster every x secs - load today, check last activity etc."""
     try:
         # can't use the client because then we end up in a dbus loop
         # as this is initiated in storage
         todays_facts = self.storage._Storage__get_todays_facts()
         self.check_user(todays_facts)
         trophies.check_ongoing(todays_facts)
     except Exception, e:
         logging.error("Error while refreshing: %s" % e)
示例#2
0
 def check_hamster(self):
     """refresh hamster every x secs - load today, check last activity etc."""
     try:
         # can't use the client because then we end up in a dbus loop
         # as this is initiated in storage
         todays_facts = self.storage._Storage__get_todays_facts()
         self.check_user(todays_facts)
         trophies.check_ongoing(todays_facts)
     except Exception, e:
         logging.error("Error while refreshing: %s" % e)
示例#3
0
文件: today.py 项目: goozbach/hamster
    def refresh_hamster(self):
        """refresh hamster every x secs - load today, check last activity etc."""
        try:
            if self.window:
                self.load_day()

            self.check_user()
            trophies.check_ongoing(self.todays_facts)
        except Exception, e:
            logging.error("Error while refreshing: %s" % e)
示例#4
0
 def check_hamster(self):
     """refresh hamster every x secs - load today, check last activity etc."""
     try:
         # can't use the client because then we end up in a dbus loop
         # as this is initiated in storage
         todays_facts = self.storage._Storage__get_todays_facts()
         self.check_user(todays_facts)
         trophies.check_ongoing(todays_facts)
     except Exception as e:
         logger.error("Error while refreshing: %s" % e)
     finally:  # we want to go on no matter what, so in case of any error we find out about it sooner
         return True
示例#5
0
 def check_hamster(self):
     """refresh hamster every x secs - load today, check last activity etc."""
     try:
         # can't use the client because then we end up in a dbus loop
         # as this is initiated in storage
         todays_facts = self.storage._Storage__get_todays_facts()
         self.check_user(todays_facts)
         trophies.check_ongoing(todays_facts)
     except Exception as e:
         logging.error("Error while refreshing: %s" % e)
     finally:
         # we want to go on no matter what,
         # so in case of any error we find out about it sooner
         return True