traceback/show exceptino when sfa_api_debug is set
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 15 Jul 2009 09:08:25 +0000 (09:08 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 15 Jul 2009 09:08:25 +0000 (09:08 +0000)
sfa/util/method.py

index 9683bc5..f24dee5 100644 (file)
@@ -6,14 +6,13 @@
 ### $Id$
 ### $URL$
 
-import xmlrpclib
+import os, time
 from types import *
+from types import StringTypes
+import traceback
 import textwrap
-import os
-import time
-import pprint
+import xmlrpclib
 
-from types import StringTypes
 
 from sfa.util.faults import * 
 from sfa.util.parameter import Parameter, Mixed, python_type, xmlrpc_type
@@ -107,9 +106,7 @@ class Method (object):
             runtime = time.time() - start
            
             if self.api.config.SFA_API_DEBUG:
-                # XX print to some log file
-                #print >> log, "Some debugging output"              
-                pass 
+                traceback.print_exc()
             raise fault