[gnome-tweak-tool] dont crash on shemas with missing keys
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] dont crash on shemas with missing keys
- Date: Mon, 25 Jun 2012 15:26:47 +0000 (UTC)
commit a83ddd89364b84d34d70cdfefe694705b0098b2b
Author: John Stowers <john stowers gmail com>
Date: Mon Jun 25 16:28:58 2012 +0200
dont crash on shemas with missing keys
gtweak/widgets.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtweak/widgets.py b/gtweak/widgets.py
index c915a17..7982c74 100644
--- a/gtweak/widgets.py
+++ b/gtweak/widgets.py
@@ -109,7 +109,13 @@ class _GSettingsTweak(Tweak):
self.settings = GSettingsFakeSetting()
Tweak.__init__(self,"","")
self.loaded = False
- logging.info("Missing gsettings %s (key %s)" % (e.message, key_name))
+ logging.info("Missing gsettings %s" % (e.message))
+ except KeyError:
+ self.settings = GSettingsFakeSetting()
+ Tweak.__init__(self,"","")
+ self.loaded = False
+ logging.info("Missing gsettings %s (key %s)" % (schema_name, key_name))
+
class GSettingsSwitchTweak(_GSettingsTweak):
def __init__(self, schema_name, key_name, **options):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]