Hi,
following small note to the patch:
what about using an else clause in the _load_favorites() method? So we know
which
ValueError the except block is trying to catch.
try:
favorites_data = simplejson.load(open(favorites_path))
except ValueError, e:
logging.error('Error while loading favorite_activities: %r.' %
e)
else:
# Old structure was a list instead of a dictionary.
if isinstance(favorites_data, list):
favorite_bundles = favorites_data
else:
favorite_bundles = favorites_data['favorites']
self._last_defaults_mtime = favorites_data['defaults-mtime']
But r+ in general.
Best,
Simon
_______________________________________________
Sugar mailing list
[email protected]
http://lists.laptop.org/listinfo/sugar