[gnome-tweak-tool] fix missing schema check
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] fix missing schema check
- Date: Mon, 10 Jun 2013 07:10:02 +0000 (UTC)
commit 2e4ccde24c79ff803d3efa193b8eb113d1381b11
Author: John Stowers <john stowers gmail com>
Date: Mon Jun 10 09:09:24 2013 +0200
fix missing schema check
gtweak/gsettings.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtweak/gsettings.py b/gtweak/gsettings.py
index 67e9b89..a00fe19 100644
--- a/gtweak/gsettings.py
+++ b/gtweak/gsettings.py
@@ -113,10 +113,12 @@ class GSettingsFakeSetting:
class GSettingsSetting(Gio.Settings):
def __init__(self, schema_name, schema_dir=None, schema_path=None, **options):
+
if schema_dir is None:
- if schema_name not in _GSETTINGS_SCHEMAS and \
- (schema_path is not None and \
- schema_name not in _GSETTINGS_RELOCATABLE_SCHEMAS):
+ if schema_path is None and schema_name not in _GSETTINGS_SCHEMAS:
+ raise GSettingsMissingError(schema_name)
+
+ if schema_path is not None and schema_name not in _GSETTINGS_RELOCATABLE_SCHEMAS:
raise GSettingsMissingError(schema_name)
if schema_path is None:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]