cea-hpc/clustershell — Issue #102: Wrong error type when calling Task.key_retcode(key)
Author: thiell
Created: 2012-03-03 16:47:25+00:00
State: open
Labels: Lib

The exception message raised is unclear:

{{{
File "/usr/local/lib/python2.6/dist-packages/ClusterShell/Task.py", line 870, in key_retcode
return max(self._rc_iter_by_key(key))
ValueError: max() arg is an empty sequence
}}}

When calling {{{Task.key_retcode(key)}}}, if the key is not valid, a proper exception type (or at least another message) would be better.