Comment 2 for bug 940941

Revision history for this message
Christian Berendt (berendt) wrote :

Looks like it is a problem with the used python version (python-2.6.0-8.14.1) on SLES11 SP1 (and SLES11 SP2 uses 2.6.0, too).

Starting with Python 2.6.5 it's possible to use unicode strings (u'foobar') as keyword arguments (http://bugs.python.org/issue4978). Before Python 2.6.5 using unicode strings as keyword arguments throw an exception (TypeError: __init__() keywords must be strings).

The network_model.NetworkInfo.hydrate method is called with a variable nw_info which contains a lot of unicode strings. So my suggestion for the moment is that it's a problem with Python < 2.6.5.

I think nothing to fix here. I'll open a service request and ask if SUSE can backport the patch for the Python issue 4978.

You can test it with the following code:

>>> def foobar(**kwargs):
... print "lalala"
...

>>> foobar(**{'blar': '1234'})
lalala
>>> foobar(**{u'blar': '1234'})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: foobar() keywords must be strings