[gnome-tweak-tool] Tidy up debug printing
- From: John Stowers <jstowers src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tweak-tool] Tidy up debug printing
- Date: Mon, 21 Mar 2011 08:56:59 +0000 (UTC)
commit 6bc24a8367e5fcf3d7e984dd302c265198c5d1aa
Author: John Stowers <john stowers gmail com>
Date: Mon Mar 21 16:28:58 2011 +1300
Tidy up debug printing
gtweak/gconf.py | 6 +++++-
gtweak/gsettings.py | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtweak/gconf.py b/gtweak/gconf.py
index 0b4d2d9..127044a 100644
--- a/gtweak/gconf.py
+++ b/gtweak/gconf.py
@@ -14,7 +14,6 @@ class GConfSetting:
def _run_gconftool(self, command):
if command not in self._cmd_cache:
- print "executing gconftool. YUCK!"
p = subprocess.Popen(
["gconftool-2", command, self._key],
stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True)
@@ -23,6 +22,8 @@ class GConfSetting:
self._cmd_cache[command] = stdout.strip()
else:
self._cmd_cache[command] = "ERROR: %s" % stderr.strip()
+
+ print "Caching gconf: %s (%s)" % (self, command)
return self._cmd_cache[command]
def schema_get_summary(self):
@@ -50,6 +51,9 @@ class GConfSetting:
else:
assert(False)
+ def __repr__(self):
+ return "<gtweak.gconf.GConfSetting: %s>" % self._key
+
if __name__ == "__main__":
key = "/apps/metacity/general/compositing_manager"
s = GConfSetting(key, bool)
diff --git a/gtweak/gsettings.py b/gtweak/gsettings.py
index 2010678..604ae4d 100644
--- a/gtweak/gsettings.py
+++ b/gtweak/gsettings.py
@@ -40,7 +40,7 @@ class GSettingsSetting(Gio.Settings):
Gio.Settings.__init__(self, schema_name)
if schema_name not in _SCHEMA_CACHE:
_SCHEMA_CACHE[schema_name] = _GSettingsSchema(schema_name, **options)
- print "Caching schema: ", _SCHEMA_CACHE[schema_name]
+ print "Caching gsettings: %s" % _SCHEMA_CACHE[schema_name]
self._schema = _SCHEMA_CACHE[schema_name]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]