Hi Aron, On Mon, 2012-01-16 at 02:19 +0000, Parsons, Aron wrote: > I was making use of configchannel_import in spacecmd at work last week > and noticed that the API seems to eat newlines at the end of a file; > what you put in is not what you get out.
Ok, thanks for the feedback, I'd not spotted this issue. I did recently see a somewhat similar issue with the ASCII escape character, which causes internal server error, e.g: echo -ne "\x1b" > /tmp/foo spacecmd --debug -- configchannel_addfile -c config_channel -p /tmp/foo -f /tmp/foo Digging into this, it appears the ASCII escape character does not constitute valid XML, which causes the API to blow up. > Steve, > Do you want to try and find a workaround or just call this out in the > documentation for the configchannel_import function? I don't want to > say it makes configchannel_import worthless, but without a fix, I know > I can't rely on it for the job it intends to do. Definitely find a workaround. Maybe the base64 solution proposed by Tomas can be used to transparently work around both issues - I'll try to come up with some patches which allow spacecmd to automatically export/import files as base64/binary when the API can't handle parsing them as text. Steve _______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel