|
From: <ba...@us...> - 2008-09-16 01:44:15
|
Revision: 981
http://omc.svn.sourceforge.net/omc/?rev=981&view=rev
Author: bartw
Date: 2008-09-16 01:44:26 +0000 (Tue, 16 Sep 2008)
Log Message:
-----------
some better error handling
Modified Paths:
--------------
cmpi-bindings/trunk/src/cmpi_provider_python.c
cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py
Modified: cmpi-bindings/trunk/src/cmpi_provider_python.c
===================================================================
--- cmpi-bindings/trunk/src/cmpi_provider_python.c 2008-09-16 01:40:00 UTC (rev 980)
+++ cmpi-bindings/trunk/src/cmpi_provider_python.c 2008-09-16 01:44:26 UTC (rev 981)
@@ -178,6 +178,7 @@
if (!PyString_Check(obstr))
TB_ERROR("getvalue() did not return a string");
+ _SBLIM_TRACE(1,(PyString_AsString(obstr)));
args = PyTuple_New(2);
PyTuple_SetItem(args, 0, string2py("\n"));
PyTuple_SetItem(args, 1, string2py("<br>"));
Modified: cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py
===================================================================
--- cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-09-16 01:40:00 UTC (rev 980)
+++ cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-09-16 01:44:26 UTC (rev 981)
@@ -461,6 +461,9 @@
def pywbem2cmpi_instname(self, iname):
cop = self.broker.new_object_path(iname.namespace, str(iname.classname))
for name, val in iname.keybindings.items():
+ if val is None:
+ raise ValueError('NULL value for key "%s.%s"' % \
+ (iname.classname, name))
data, _type = self.pywbem2cmpi_value(val)
cop.add_key(str(name), data, _pywbem2cmpi_typemap[_type])
return cop
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|