[kupfer] Adjust debug output when failing to construct AppLeaf
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] Adjust debug output when failing to construct AppLeaf
- Date: Wed, 3 Mar 2010 17:21:50 +0000 (UTC)
commit 670e9d9753dfe88f17e798e41aeeeb9f4f10c50e
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Mon Feb 15 15:47:49 2010 +0100
Adjust debug output when failing to construct AppLeaf
We can't use the output mixin functions, since the object is not yet
properly constructed (__init__ was not called).
kupfer/obj/objects.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/kupfer/obj/objects.py b/kupfer/obj/objects.py
index 7fae85f..b7f5a37 100644
--- a/kupfer/obj/objects.py
+++ b/kupfer/obj/objects.py
@@ -146,7 +146,7 @@ class SourceLeaf (Leaf):
def get_icon_name(self):
return self.object.get_icon_name()
-class AppLeaf (Leaf, pretty.OutputMixin):
+class AppLeaf (Leaf):
def __init__(self, item=None, init_path=None, app_id=None):
"""Try constructing an Application for GAppInfo @item,
for file @path or for package name @app_id.
@@ -201,13 +201,13 @@ class AppLeaf (Leaf, pretty.OutputMixin):
# try to annotate the GAppInfo object
item.init_path = self.init_path
except AttributeError, exc:
- self.output_debug(exc)
+ pretty.print_debug(__name__, exc)
elif self.init_item_id:
try:
item = DesktopAppInfo(self.init_item_id)
except RuntimeError:
- self.output_debug(self, "Application", self.init_item_id,
- "not found")
+ pretty.print_debug(__name__, "Application not found:",
+ self.init_item_id)
self.object = item
if not self.object:
raise InvalidDataError
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]