summaryrefslogtreecommitdiff
blob: 03bd049e4971cff5ce609f3ce5dfe4830c31e570 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 96ca58e9034c0a4ae6d84ca53e37bc1d50ec0923 Mon Sep 17 00:00:00 2001
From: John Stowers <john.stowers@gmail.com>
Date: Thu, 24 Nov 2011 09:55:38 +1300
Subject: [PATCH] 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 = {}
-- 
1.7.8.3