From 681625e65d2f2b543da92a42a52f90f2ab3b1ef2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 17:02:45 +0200 Subject: * janis fake gconf patch added --- UpdateManager/UpdateManager.py | 5 ++++- UpdateManager/fakegconf.py | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 UpdateManager/fakegconf.py (limited to 'UpdateManager') diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index bdbfc20f..bad5af88 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -28,7 +28,10 @@ pygtk.require('2.0') import gtk import gtk.gdk import gtk.glade -import gconf +try: + import gconf +except: + import fakegconf as gconf import gobject import apt import apt_pkg diff --git a/UpdateManager/fakegconf.py b/UpdateManager/fakegconf.py new file mode 100644 index 00000000..fd465fa3 --- /dev/null +++ b/UpdateManager/fakegconf.py @@ -0,0 +1,24 @@ +# This is a class which contains stubs for the gconf methods +# used in Update Manager. When gconf is unavailable it will +# still work but not retain the user settings. + +class FakeGconf: + + def get_bool(self, key): + return False + + def set_bool(self, key,value): + pass + + def get_pair(self, key, ta = None, tb = None): + return [300,300] + + def set_pair(self, key, ta, tb, a, b): + pass + +VALUE_INT = "" + +def client_get_default(): + return FakeGconf() + + -- cgit v1.2.3