spacewalkproject/spacewalk — pull request #40 by dyordano (2014-04-14 10:13:09+00:00)
Title: 1073543 - sw-clone-by-date validation update

Spacewalk-clone-by-date channel validation option is not updated according to the last changes.

#spacewalk-clone-by-date -l channel clone-channel --username xxxxxx --password xxxxxx --validate
Traceback (most recent call last):
File "/usr/bin/spacewalk-clone-by-date", line 375, in
sys.exit(abs(main() or 0))
File "/usr/bin/spacewalk-clone-by-date", line 365, in main
return cloneByDate.main(args)
File "/usr/share/rhn/utils/cloneByDate.py", line 186, in main
validate(channel_list.values())
File "/usr/share/rhn/utils/cloneByDate.py", line 72, in validate
tmp_dirs[label] = tmp
TypeError: unhashable type: 'list'

-- Related code
def validate(channel_labels):
tmp_dirs = {}
for label in channel_labels:
path = repodata(label)
tmp = tempfile.mkdtemp()
tmp_dirs[label] = tmp
shutil.copytree(path, "%s/repodata/" % tmp)

--Debug info
(Pdb) channel_labels
[['clone-channel']]