Description of problem: spacecmd fails with configchannel_import Version-Release number of selected component (if applicable): spacecmd-2.1.24-1.el6.noarch.rpm How reproducible: spacecmd --debug -- configchannel_import attached_file.json Actual results: Python traceback error Expected results: Import all files without any issues Additional info: With spacecmd Version "spacecmd-2.0.2-1.el6.noarch.rpm" its running without any problems. I think it has something to do with the commit "9b8bcda9bb508a1d8067877e0438f3e4a3cbc2cd". #spacecmd --debug -- configchannel_import /var/www/html/pub/clone_releases/6_5.1_rhel-x86_64-server-6/export_cc/6_5.1_x86_64_ccs.json DEBUG: : False DEBUG: Read configuration from /root/.spacecmd/config DEBUG: Loading configuration section [spacecmd] DEBUG: Current Configuration: {'server': 'localhost'} DEBUG: Configuration section [localhost] does not exist DEBUG: Connecting to https://localhost/rpc/api DEBUG: Server API Version = 13.0 DEBUG: Using cached credentials from /root/.spacecmd/localhost/session DEBUG: Loading cache from /root/.spacecmd/localhost/ssm DEBUG: : False DEBUG: Loading cache from /root/.spacecmd/localhost/systems DEBUG: Loading cache from /root/.spacecmd/localhost/errata DEBUG: Loading cache from /root/.spacecmd/localhost/packages_short DEBUG: Loading cache from /root/.spacecmd/localhost/packages_long DEBUG: Loading cache from /root/.spacecmd/localhost/packages_by_id INFO: Connected to https://localhost/rpc/api as admin DEBUG: Passed filename do_configchannel_import /var/www/html/pub/clone_releases/6_5.1_rhel-x86_64-server-6/export_cc/6_5.1_x86_64_ccs.json INFO: Importing config channel 6_5.1_x86_64_common INFO: Found file /etc/at.allow for cc 6_5.1_x86_64_common ERROR: translate() takes exactly one argument (2 given) Traceback (most recent call last): File "/usr/bin/spacecmd", line 133, in <module> shell.print_result(shell.onecmd( precmd ), precmd) File "/usr/lib64/python2.6/cmd.py", line 219, in onecmd return func(arg) File "/usr/lib/python2.6/site-packages/spacecmd/configchannel.py", line 976, in do_configchannel_import if self.import_configchannel_fromdetails(ccdetails) != True: File "/usr/lib/python2.6/site-packages/spacecmd/configchannel.py", line 1029, in import_configchannel_fromdetails elif self.file_needs_b64_enc(filedetails['contents']): File "/usr/lib/python2.6/site-packages/spacecmd/utils.py", line 742, in file_needs_b64_enc return float(len(contents.translate(_null_trans, text_characters))) / len(contents) > 0.3 TypeError: translate() takes exactly one argument (2 given)
spacewalk.git master: 6daf599d669ec8b2f835991f0e30ac341e7f1d41
Hi Milan, thanks for your fix. I will check this new version on Monday and I will give you Feedback. Cheers, Gregor
Hi Milan, I just want to say, that with spacecmd-2.1.25-1.el6.noarch this issue does not exist anymore. Thank you
Spacewalk 2.1 has been released. https://fedorahosted.org/spacewalk/wiki/ReleaseNotes21