[rhythmbox] rb.Loader: remove UpdateCheck, hasn't been used in quite a while



commit 4859c2d5e5e41d7b85f7f20276c0e7ba67ee3428
Author: Jonathan Matthew <jonathan d14n org>
Date:   Fri Nov 22 22:05:41 2019 +1000

    rb.Loader: remove UpdateCheck, hasn't been used in quite a while

 plugins/rb/Loader.py | 34 ----------------------------------
 plugins/rb/rb.py     |  1 -
 2 files changed, 35 deletions(-)
---
diff --git a/plugins/rb/Loader.py b/plugins/rb/Loader.py
index e37c05aab..e32259962 100644
--- a/plugins/rb/Loader.py
+++ b/plugins/rb/Loader.py
@@ -72,37 +72,3 @@ class Loader(object):
                self._cancel.cancel()
 
 
-
-class UpdateCheck(object):
-       def __init__ (self):
-               self._cancel = Gio.Cancellable()
-
-       def _file_info_cb (self, file, result, data):
-               try:
-                       rfi = file.query_info_finish(result)
-                       remote_mod = rfi.get_attribute_uint64(Gio.FILE_ATTRIBUTE_TIME_MODIFIED)
-                       call_callback(self.callback, remote_mod != self.local_mod, self.args)
-               except Exception as e:
-                       sys.excepthook(*sys.exc_info())
-                       call_callback(self.callback, False, self.args)
-
-       def check_for_update (self, local, remote, callback, *args):
-               self.local = local
-               self.remote = remote
-               self.callback = callback
-               self.args = args
-
-               try:
-                       lf = Gio.file_new_for_commandline_arg(local)
-                       lfi = lf.query_info(Gio.FILE_ATTRIBUTE_TIME_MODIFIED, Gio.FileQueryInfoFlags.NONE, 
None)
-                       self.local_mod = lfi.get_attribute_uint64(Gio.FILE_ATTRIBUTE_TIME_MODIFIED)
-
-                       rf = Gio.file_new_for_uri(remote)
-                       rf.query_info_async(Gio.FILE_ATTRIBUTE_TIME_MODIFIED, Gio.FileQueryInfoFlags.NONE, 
GLib.PRIORITY_DEFAULT, self._cancel, self._file_info_cb, None)
-               except Exception as e:
-                       sys.excepthook(*sys.exc_info())
-                       self.callback(True, *self.args)
-
-       def cancel (self):
-               self._cancel.cancel()
-
diff --git a/plugins/rb/rb.py b/plugins/rb/rb.py
index 0a42ac9bd..e956dd453 100644
--- a/plugins/rb/rb.py
+++ b/plugins/rb/rb.py
@@ -35,7 +35,6 @@ from gi.repository import RB, Gtk
 
 # rb classes
 from Loader import Loader
-from Loader import UpdateCheck
 from Coroutine import Coroutine
 from URLCache import URLCache
 import rbconfig


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]