Ejemplo n.º 1
0
 def run(self):
     while not self.shutdown_event.is_set():
         calibre_update_version = NO_CALIBRE_UPDATE
         plugins_update_found = 0
         try:
             version = get_newest_version()
             if version[:2] > numeric_version[:2]:
                 calibre_update_version = version
         except Exception as e:
             prints('Failed to check for calibre update:', as_unicode(e))
         try:
             update_plugins = get_plugin_updates_available(raise_error=True)
             if update_plugins is not None:
                 plugins_update_found = len(update_plugins)
         except Exception as e:
             prints('Failed to check for plugin update:', as_unicode(e))
         if calibre_update_version != NO_CALIBRE_UPDATE or plugins_update_found > 0:
             self.signal.update_found.emit(calibre_update_version, plugins_update_found)
         self.shutdown_event.wait(self.INTERVAL)
Ejemplo n.º 2
0
 def run(self):
     while not self.shutdown_event.is_set():
         calibre_update_version = NO_CALIBRE_UPDATE
         plugins_update_found = 0
         try:
             version = get_newest_version()
             if version[:2] > numeric_version[:2]:
                 calibre_update_version = version
         except Exception as e:
             prints('Failed to check for calibre update:', as_unicode(e))
         try:
             update_plugins = get_plugin_updates_available(raise_error=True)
             if update_plugins is not None:
                 plugins_update_found = len(update_plugins)
         except Exception as e:
             prints('Failed to check for plugin update:', as_unicode(e))
         if calibre_update_version != NO_CALIBRE_UPDATE or plugins_update_found > 0:
             self.signal.update_found.emit(calibre_update_version, plugins_update_found)
         self.shutdown_event.wait(self.INTERVAL)
Ejemplo n.º 3
0
 def run(self):
     while True:
         calibre_update_version = NO_CALIBRE_UPDATE
         plugins_update_found = 0
         try:
             version = get_newest_version()
             if version and version != __version__ and len(version) < 10:
                 calibre_update_version = version
         except Exception as e:
             prints('Failed to check for calibre update:', as_unicode(e))
         try:
             update_plugins = get_plugin_updates_available(raise_error=True)
             if update_plugins is not None:
                 plugins_update_found = len(update_plugins)
         except Exception as e:
             prints('Failed to check for plugin update:', as_unicode(e))
         if (calibre_update_version != NO_CALIBRE_UPDATE or
                 plugins_update_found > 0):
             self.update_found.emit('%s%s%d'%(calibre_update_version,
                 VSEP, plugins_update_found))
         self.sleep(self.INTERVAL)
Ejemplo n.º 4
0
 def run(self):
     while True:
         calibre_update_version = NO_CALIBRE_UPDATE
         plugins_update_found = 0
         try:
             version = get_newest_version()
             if version and version != __version__ and len(version) < 10:
                 calibre_update_version = version
         except Exception as e:
             prints('Failed to check for calibre update:', as_unicode(e))
         try:
             update_plugins = get_plugin_updates_available(raise_error=True)
             if update_plugins is not None:
                 plugins_update_found = len(update_plugins)
         except Exception as e:
             prints('Failed to check for plugin update:', as_unicode(e))
         if (calibre_update_version != NO_CALIBRE_UPDATE
                 or plugins_update_found > 0):
             self.update_found.emit(
                 '%s%s%d' %
                 (calibre_update_version, VSEP, plugins_update_found))
         self.sleep(self.INTERVAL)