Skip to content

NodeSet should support unicode #251

@wilfriedroset

Description

@wilfriedroset

Hi,

Is it plan to support unicode ? The error message is quite clear:

>>> NodeSet(u"node1")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/ClusterShell/NodeSet.py", line 909, in __init__
    self.update(nodes)
  File "/usr/lib/python2.7/site-packages/ClusterShell/NodeSet.py", line 1173, in update
    nodeset = self._parser.parse(other, self._autostep)
  File "/usr/lib/python2.7/site-packages/ClusterShell/NodeSet.py", line 689, in parse
    raise TypeError("Unsupported NodeSet input %s" % type(nsobj))
TypeError: Unsupported NodeSet input <type 'unicode'>
>>> NodeSet(str(u"node1"))
<ClusterShell.NodeSet.NodeSet object at 0x7f169eae5ed0>

It would be great of clustershell to support it so we can create nodeset seamlessly from string or unicode.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions