Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 581857 Details for
Bug 818579
Error parsing NULL properties in Python provider
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
(highly) experimental patch
cmpi-bindings-null.patch (text/plain), 2.19 KB, created by
Jan Safranek
on 2012-05-03 12:53:58 UTC
(
hide
)
Description:
(highly) experimental patch
Filename:
MIME Type:
Creator:
Jan Safranek
Created:
2012-05-03 12:53:58 UTC
Size:
2.19 KB
patch
obsolete
>diff -up cmpi-bindings-0.4.17/swig/cmpi.i.old cmpi-bindings-0.4.17/swig/cmpi.i >--- cmpi-bindings-0.4.17/swig/cmpi.i.old 2012-05-03 10:24:05.275271659 +0200 >+++ cmpi-bindings-0.4.17/swig/cmpi.i 2012-05-03 10:26:06.503726504 +0200 >@@ -252,6 +252,9 @@ data_value(const CMPIData *dp) > else if (dp->state & CMPI_badValue) { > SWIG_exception(SWIG_ValueError, "bad value"); > } >+ else if (dp->state & CMPI_null) { >+ result = value_value(&(dp->value), CMPI_null); >+ } > else if ((dp->type) & CMPI_ARRAY) { > int size = CMGetArrayCount(dp->value.array, NULL); > int i; >@@ -286,10 +290,6 @@ data_data(const CMPIData *dp) > else if (dp->state & CMPI_badValue) { > SWIG_exception(SWIG_ValueError, "bad value"); > } >- else if (dp->state & CMPI_nullValue) { >- result = Target_Null; >- Target_INCREF(result); >- } > else if ((dp->type) & CMPI_ARRAY) { > int size = CMGetArrayCount(dp->value.array, NULL); > int i; >diff -up cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py.orig cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py >--- cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py.orig 2012-05-03 13:21:14.982196890 +0200 >+++ cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py 2012-05-03 13:22:18.684439933 +0200 >@@ -860,6 +860,8 @@ class CMPIProxyProvider(object): > def cmpi2pywbem_data(self, cdata, _type=None, is_array=None): > #TODO check for valid cdata.state > #TODO error handling >+ if (cdata.state & cmpi.CMPI_nullValue) > 0: >+ return None > if _type is None: > _type, is_array = _cmpi_type2string(cdata.type) > attr = _type >diff -up cmpi-bindings-0.4.17/swig/cmpi.i.orig cmpi-bindings-0.4.17/swig/cmpi.i >--- cmpi-bindings-0.4.17/swig/cmpi.i.orig 2012-05-03 14:27:07.513117565 +0200 >+++ cmpi-bindings-0.4.17/swig/cmpi.i 2012-05-03 14:28:11.160763227 +0200 >@@ -289,7 +289,7 @@ data_data(const CMPIData *dp) > else if (dp->state & CMPI_badValue) { > SWIG_exception(SWIG_ValueError, "bad value"); > } >- else if ((dp->type) & CMPI_ARRAY) { >+ else if (!(dp->state & CMPI_nullValue) && (dp->type & CMPI_ARRAY)) { > int size = CMGetArrayCount(dp->value.array, NULL); > int i; > result = Target_SizedArray(size);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 818579
: 581857