diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-04-04 17:02:45 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-04-04 17:02:45 +0200 |
| commit | 681625e65d2f2b543da92a42a52f90f2ab3b1ef2 (patch) | |
| tree | 077c68f8c0af3c88e9b37eba81e06819ed71af96 /UpdateManager | |
| parent | 5f87a4cb3ff6f83519dd2680879e921a58a4b16c (diff) | |
| download | python-apt-681625e65d2f2b543da92a42a52f90f2ab3b1ef2.tar.gz | |
* janis fake gconf patch added
Diffstat (limited to 'UpdateManager')
| -rw-r--r-- | UpdateManager/UpdateManager.py | 5 | ||||
| -rw-r--r-- | UpdateManager/fakegconf.py | 24 |
2 files changed, 28 insertions, 1 deletions
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() + + |
