[gnome-tweak-tool] Print more useful error for missing schemas
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Print more useful error for missing schemas
- Date: Wed, 23 Nov 2011 20:55:44 +0000 (UTC)
commit 96ca58e9034c0a4ae6d84ca53e37bc1d50ec0923
Author: John Stowers <john stowers gmail com>
Date: Thu Nov 24 09:55:38 2011 +1300
Print more useful error for missing schemas
gtweak/gsettings.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtweak/gsettings.py b/gtweak/gsettings.py
index ca7020f..9ab8749 100644
--- a/gtweak/gsettings.py
+++ b/gtweak/gsettings.py
@@ -31,7 +31,9 @@ class _GSettingsSchema:
schema_filename = schema_name + ".gschema.xml"
schema_path = os.path.join(schema_dir, schema_filename)
- assert(os.path.exists(schema_path))
+ if not os.path.exists(schema_path):
+ logging.critical("Could not find schema %s" % schema_path)
+ assert(False)
self._schema_name = schema_name
self._schema = {}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]