|
From: <ba...@us...> - 2008-10-10 20:32:11
|
Revision: 1083
http://omc.svn.sourceforge.net/omc/?rev=1083&view=rev
Author: bartw
Date: 2008-10-10 20:32:03 +0000 (Fri, 10 Oct 2008)
Log Message:
-----------
preserve exception stack trace when converting the exception
Modified Paths:
--------------
cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py
Modified: cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py
===================================================================
--- cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-10-10 20:17:28 UTC (rev 1082)
+++ cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-10-10 20:32:03 UTC (rev 1083)
@@ -38,6 +38,7 @@
import pywbem
import types
import syslog
+import sys
##==============================================================================
##
@@ -76,8 +77,11 @@
try:
return self.meth(*args, **kwds)
except cmpi.CMPIException,e:
- raise _exception_to_error(e)
+ exc_class, exc, tb = sys.exc_info()
+ new_exc = _exception_to_error(e)
+ raise new_exc.__class__, new_exc, tb
+
##==============================================================================
##
## ExceptionClassWrapper
@@ -713,6 +717,9 @@
if pinst.property_list is not None:
cinst.set_property_filter(pinst.property_list)
for prop in pinst.properties.values():
+ # if pinst.property_list and \
+ # prop.name.lower() not in pinst.property_list:
+ # continue
data, _type = self.pywbem2cmpi_value(prop.value, _type=prop.type)
ctype = _pywbem2cmpi_typemap[_type]
if isinstance(prop.value, list):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|