On 2011-03-07 19:30:24 +0100, Juergen Weigert wrote:
On Mar 07, 11 18:39:29 +0100, Marcus Hüwe wrote:
Hi,
On 2011-03-07 18:02:50 +0100, OBS osc wrote:
From: Juergen Weigert
--- osc/core.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/osc/core.py b/osc/core.py index ccc1a06..560a36e 100644 --- a/osc/core.py +++ b/osc/core.py @@ -3512,7 +3512,12 @@ def create_submit_request(apiurl, orev or show_upstream_rev(apiurl, src_project, src_package), targetxml, options_block, - cgi.escape(unicode(message, "utf8"))) + cgi.escape(message)) + + # Don't do cgi.escape(unicode(message, "utf8"))) above. + # Promoting the string to utf8, causes the post to explode with: + # uncaught exception: Fatal error: Start tag expected, '<' not found at :1. + # I guess, my original workaround was not that bad.
Hmm can you please provide the exact commandline of the failing osc command? At the moment I fail to see what's wrong with a simple "cgi.escape(message)" (without the unicode stuff).
I am sitting in a checkout directory of SUSE:Factory:Head collectl (any package should do) and doing this:
$ osc -d -A https://api.suse.de submitpac --cleanup -m 'testing cgi unucode encoding'
The following happens, when I have 'cgi.escape(unicode(message, "utf8")))' in the code. The output after the -------- comes from a print xml.__repr__().
Ok. What error do you get without the unicode(...)? Unfortunately I can't reproduce the original problem:/
This was behind an ssh connection on a SLE11SP1 machine, where my login session apparently lives in latin1 world. Not sure if it works with a better environment.
Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org