[sugar] [PATCH] adding a bad device to the frame shouldn't crash sugar

Tomeu Vizoso tomeu at tomeuvizoso.net
Wed Jun 4 05:44:09 EDT 2008


Looks good to me. Small comments inline:

> +            import logging
> +            logger = logging.getLogger('DevicesTray')

What about moving the import along with the others and declaring the
logger at the module level as in activitiesring.py?

> +            logger.warn("Not able to add icon for device [%s], because of "
> +                        "an error (%s). Continuing." % (device, message))

May be better to print the __repr__ of the device, with %r instead of
%s. In some classes, __str__ won't be as good a description of the
instance as __repr__.

Thanks,

Tomeu


More information about the Sugar mailing list