[Sugar-devel] [RELEASE] Labyrinth-5

Wade Brainerd wadetb at gmail.com
Sat Apr 11 10:49:34 EDT 2009


On Sat, Apr 11, 2009 at 4:44 AM, Gary C Martin <gary at garycmartin.com> wrote:
> Hi Michael,
>
> On 11 Apr 2009, at 06:48, Michael Stone wrote:
>
>>> P.S. One notable bug for XO 8.2 distro users, is that adding images
>>> from the Journal is currently broken (bumping into rainbow), adding
>>> images works fine on sugar-jhbuild and should be fine on Soas distros
>>> and xo-rawhide (though I haven't tested there just yet).
>>
>> Gary,
>>
>> Could you please send me a link to a ticket with logs?
>
> Sorry if I wasn't clear, it's not a Rainbow bug, but an issue I need
> to fix in Labyrinth. I had a few early passes at fixing Journal image
> import integration but not quite there yet. Basically the issue is
> that Labyrinths image loading code is buried deep down in multiple
> levels of class and/or Python modules, so I don't have obvious access
> to the various Activity name spaces for knowing where is safe to save.
>
> Line 51 if you want a quick peek:
>        http://git.sugarlabs.org/projects/labyrinth/repos/mainline/blobs/master/src/ImageThought.py
>
> Let me take another shot (might have some time on Sunday), alsroot
> made some changes here after my initial attempts, but I think he was
> fixing something else, need to catch up with what he was after.

A strategy that has worked for me in the past is to chdir to the right
directory in the activity module startup.  That way you don't have to
import sugar modules into low level source code.

Another way to deal with it is to use the environment variables
instead of the sugar APIs, and just test for the presence of the
environment variables before using them.

-Wade


More information about the Sugar-devel mailing list