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
--
j...@bas.ac.uk | (work) 01223 221402 (fax) 01223 362616
Unix System Administrator - British Antarctic Survey
#include <disclaimer.std>

_______________________________________________
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to