Hi Jeremy,
you are right that you found a bug in spacewalk-repo-sync. And of course
- thank you for your approach and for the patch, it will be applied as
soon as possible.
Regards,
Jiri
Dne 30.6.2016 v 15:09 Jeremy Robst napsal(a):
Hi,
I recently upgraded to Spacewalk 2.5 and I noticed that
spacewalk-repo-sync has stopped working when using the parent channel
option.
i.e if I do
spacewalk-repo-sync -p centos-6-x86_64
to sync all my CentOS 6 x86_64 channels it fails with the error
raceback (most recent call last):
File "/usr/bin/spacewalk-repo-sync", line 219, in <module>
sys.exit(abs(main() or 0))
File "/usr/bin/spacewalk-repo-sync", line 161, in main
if len(options.channel_label)>0:
TypeError: object of type 'NoneType' has no len()
But syncing a specific channel with -c is fine. I can fix this with a
simple change to spacewalk-repo-sync :
--- /tmp/spacewalk.org 2016-06-30 14:07:15.665193636 +0100
+++ /usr/bin/spacewalk-repo-sync 2016-06-30 14:07:22.890377969 +0100
@@ -158,7 +158,7 @@
if 'parent_channel' in config:
options.parent_label+=config['parent_channel']
- if len(options.channel_label)>0:
+ if options.channel_label and len(options.channel_label)>0:
for channel in options.channel_label:
d_ch_repo_sync[channel]=options.url
Is this a bug, or am I doing something wrong after the upgrade ?
Thanks
Jeremy
--
Hezký den,
Jiří Dostál
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list