[Python-modules-team] Bug#623433: #623433: python-zsi: Faulty detection of nillable elements

Christian Hofstaedtler zeha at debian.org
Sat Feb 20 00:01:53 UTC 2016


Hi,

while I don't expect this bug to go anywhere, here's some additional
info. We've found us in a similar situation, where the service we
were talking to returned nil elements in an apache map.

Unfortunately the proposed patch didn't solve the issue for us,
probably because of a namespace prefixing issue.

A colleague came up with this patch and we've been using that in
production for quite a while:


diff --git a/ZSI/TCapache.py b/ZSI/TCapache.py
index fe39a00..3d61faf 100644
--- a/ZSI/TCapache.py
+++ b/ZSI/TCapache.py
@@ -17,7 +17,7 @@ class _Map(TypeCode):
     def __init__(self, pname=None, aslist=0, **kw):
         TypeCode.__init__(self, pname, **kw)
         self.aslist = aslist
-        self.tc = _Struct(None, [ _Any('key'), _Any('value') ], inline=1)
+        self.tc = _Struct(None, [ _Any('key'), _Any('value', nillable=True) ], inline=1)
 
     def parse(self, elt, ps):
         self.checkname(elt, ps)


-- 
 ,''`.  Christian Hofstaedtler <zeha at debian.org>
: :' :  Debian Developer
`. `'   7D1A CFFA D9E0 806C 9C4C  D392 5C13 D6DB 9305 2E03
  `-



More information about the Python-modules-team mailing list