Re: [OE-core] [PATCH] Allow script to work with Python 2.4 and 3.

2013-10-15 Thread Burton, Ross
On 15 October 2013 06:22, Laurentiu Palcu wrote: > Is it wise to encode the strings with latin_1 by default? Would it work > if the filename uses cyrillic characters? Or chinese? Especially not considering every modern distro defaults to UTF-8 locales now. Using the system encoding makes sense.

Re: [OE-core] [PATCH] Allow script to work with Python 2.4 and 3.

2013-10-14 Thread Laurentiu Palcu
Hi, Somehow I missed this patch... See my comment below. On Mon, Oct 14, 2013 at 11:03:09AM -0700, Saul Wold wrote: > On 10/11/2013 08:30 AM, Konrad Scherer wrote: > >From: Konrad Scherer > > > >Python 2.4 does not support the 'b' string literal or the > >keyword 'as' in exception handling. Pyth

Re: [OE-core] [PATCH] Allow script to work with Python 2.4 and 3.

2013-10-14 Thread Saul Wold
On 10/11/2013 08:30 AM, Konrad Scherer wrote: From: Konrad Scherer Python 2.4 does not support the 'b' string literal or the keyword 'as' in exception handling. Python 3 does not accept the old method of exception handling and defaults to unicode. The b() function converts strings to bytes on P

[OE-core] [PATCH] Allow script to work with Python 2.4 and 3.

2013-10-11 Thread Konrad Scherer
From: Konrad Scherer Python 2.4 does not support the 'b' string literal or the keyword 'as' in exception handling. Python 3 does not accept the old method of exception handling and defaults to unicode. The b() function converts strings to bytes on Python 3 and using sys.exc_info() avoids the exce