[kupfer] helplib: Use pretty.print_exc for exceptions in _BackgroundLoader
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] helplib: Use pretty.print_exc for exceptions in _BackgroundLoader
- Date: Tue, 9 Mar 2010 00:02:07 +0000 (UTC)
commit 8eb61031847556f84d1e5fdb5e1e3de17e7065a3
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Tue Mar 9 00:50:41 2010 +0100
helplib: Use pretty.print_exc for exceptions in _BackgroundLoader
In normal mode, print_exc will print a single-line message with the
exception. In debug mode, it will print the full traceback.
Based on patch by Karol
kupfer/obj/helplib.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/obj/helplib.py b/kupfer/obj/helplib.py
index 8c1f0f3..a90441c 100644
--- a/kupfer/obj/helplib.py
+++ b/kupfer/obj/helplib.py
@@ -11,6 +11,7 @@ import traceback
import gio
from kupfer import task
+from kupfer import pretty
class PicklingHelperMixin (object):
""" This pickling helper will define __getstate__/__setstate__
@@ -172,7 +173,7 @@ class _BackgroundLoader (object):
self.new_data_callback()
def _error_callback(self, exc_info):
- traceback.print_exception(*exc_info)
+ pretty.print_exc(__name__, exc_info)
def fill_cache(self, data):
if data:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]