On Tue, Jun 24, 2014 at 09:13:14AM -0700, Ben Pfaff wrote: > On Fri, Jun 20, 2014 at 12:22:15PM -0700, Gurucharan Shetty wrote: > > In addition to the above bug, I see some other wierdness while dealing with > > unicode on Xenserver and Python 2.4.3 . As an example, the following diff > > would work fine if python is run from command line but not from inside > > testsuite. When run from inside the testsuite we get the same unicode error. > > I am not sure why. > > The testsuite sets LC_ALL=C and (from atlocal.in) > PYTHONIOENCODING=utf_8. That might be the difference. > > > diff --git a/tests/test-ovsdb.py b/tests/test-ovsdb.py > > index 392ed4b..cec46bd 100644 > > --- a/tests/test-ovsdb.py > > +++ b/tests/test-ovsdb.py > > @@ -105,7 +105,7 @@ def do_parse_atoms(type_string, *atom_strings): > > atom = data.Atom.from_json(base, atom_json) > > print ovs.json.to_string(atom.to_json()) > > except error.Error, e: > > - print unicode(e) > > + print e.args[0].encode("utf8") > > There's a lot of weirdness around python and encodings that varies from > version to version and from one Python configuration to the next. Did > you try this on a non-XenServer system too, say Ubuntu? Also you might > want to try on the Arch distro (I think that's Ethan uses) because I > seem to recall that it uses one of the oddball Python configurations > that has caused trouble in the past.
Oh and assuming that this doesn't cause regressions elsewhere: Acked-by: Ben Pfaff <b...@nicira.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev