From 44e4eb933408d3969ce9d85bad50912023cbd510 Mon Sep 17 00:00:00 2001 From: Juergen Weigert Date: Mon, 7 Mar 2011 18:16:10 +0100 Subject: [PATCH] Reverting Sascha's unicode attempt. This made 'osc submit' always fail with uncaught exception: Fatal error: Start tag expected, '<' not found at :1. --- osc/core.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osc/core.py b/osc/core.py index ccc1a06e..560a36e5 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. u = makeurl(apiurl, ['request'], query='cmd=create') f = http_POST(u, data=xml)