cea-hpc/clustershell — Issue #106: NodeSet: None argument not supported in methods
Author: thiell
Created: 2012-03-03 16:47:34+00:00
State: open
Labels: Lib/NodeSet

NodeSet raises !TypeError when '''None''' is passed to methods like {{{update()}}}, unlike the standard {{{Set}}} class. The following issue has been seen with shine:

{{{
#
# Shine error report - 2010-07-21 20:34:08
#

Command was: 'shine show info'

Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/Shine/Controller.py", line 119, in run_command
return self.cmds.execute(cmd_args)
File "/usr/lib/python2.6/site-packages/Shine/Commands/CommandRegistry.py", line 123, in execute
rc = command.execute()
File "/usr/lib/python2.6/site-packages/Shine/Commands/Show.py", line 211, in execute
return getattr(self, 'cmd_show_%s' % self.subcmd)()
File "/usr/lib/python2.6/site-packages/Shine/Commands/Show.py", line 147, in cmd_show_info
['value', fs_conf.get_client_mount(None)]]))
File "/usr/lib/python2.6/site-packages/Shine/Configuration/Configuration.py", line 238, in get_client_mount
if nodes.intersection_update(client):
File "/usr/lib/python2.6/site-packages/ClusterShell/NodeSet.py", line 1582, in intersection_update
ns = self._parser.parse(other, self._autostep)
File "/usr/lib/python2.6/site-packages/ClusterShell/NodeSet.py", line 1182, in parse
raise TypeError("Unsupported NodeSet input %s" % type(nsobj))
TypeError: Unsupported NodeSet input

Exception: Unsupported NodeSet input
}}}

We want to conform NodeSet to standard Set as much as possible.