summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Budischewski <jbu@openoffice.org>2003-04-06 16:13:09 +0000
committerJörg Budischewski <jbu@openoffice.org>2003-04-06 16:13:09 +0000
commita7ea7f0f355074d5bc32c7e166f6d44f74791c3a (patch)
tree0b85f3f0a1e34becc1e6c8e7466ca6dae390e97c
parent3263bfab49ccc7c54e76663b17fc5f3dc8138e28 (diff)
#i11753# added traceback extraction function
-rw-r--r--pyuno/source/module/uno.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/pyuno/source/module/uno.py b/pyuno/source/module/uno.py
index 003b02886..bef6c8d61 100644
--- a/pyuno/source/module/uno.py
+++ b/pyuno/source/module/uno.py
@@ -2,9 +2,9 @@
#
# $RCSfile: uno.py,v $
#
-# $Revision: 1.2 $
+# $Revision: 1.3 $
#
-# last change: $Author: jbu $ $Date: 2003-03-30 13:32:01 $
+# last change: $Author: jbu $ $Date: 2003-04-06 17:13:09 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -337,3 +337,17 @@ def _uno_struct__eq__(self,cmp):
return self.__dict__["value"] == cmp.__dict__["value"]
return False
+def _uno_extract_printable_stacktrace( trace ):
+ mod = None
+ try:
+ mod = __import__("traceback")
+ except ImportError,e:
+ pass
+ ret = ""
+ if mod:
+ lst = mod.format_tb( trace )
+ for i in lst:
+ ret = ret + i
+ else:
+ ret = "Coludn't import traceback module"
+ return ret