Python 2 will never have pgettext() [1], so we need to ship our own version.
sugar.activity.i18n is the best place for that.
[1] http://bugs.python.org/issue2504#msg122482
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
sugar.bundle.bundle.Bundle users (e.g.
jarabe.model.bundleregistry.BundleRegistry._add_bundle) only expect
MalformedBundleException to be thrown, not exceptions of zipfile.
This patch solves the most severe issue in #1876: filling up the
filesystem with temporary files that won't be deleted afterwards.
Before we can consider this bug completely fixed, we still need
to do something for the remaining issues:
1) Unpacking shouldn't be attempted if there isn't a safety margin
2) System becomes unresponsive during unpacking
3) No progress indication for the operation, so users are tempted
to click multiple times
4) No error messages displayed for unpacking errors, which is a
common Sugar nuisance.
http://bugs.sugarlabs.org/ticket/1876#comment:5 offers possible
strategies for (1) and (2).
Signed-off-by: Martin Dengler <martin@martindengler.com>
Signed-off-by: Bernie Innocenti <bernie@codewiz.org>
[style fixes, adjusted description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Reviewed-by: Aleksey Lim <alsroot@activitycentral.org>
Color data is stored in the Journal as a JSON dump, so we can get back
arbitrary types. XoColor already checks the color string for validity and
handles invalid strings gracefully, so it makes sense to enhance this to
invalid types as well.
Acked-by: Simon Schampijer <simon@schampijer.de>
As we do create the ActivityBundle in the config of the bundlebuilder
we can use the code from the activitybundle as well to install
the mime type.
Reviewed-By: Sascha Silbe <sascha-pgp@silbe.org>
pylint isn't smart enough to figure out the return type of Popen.communicate(),
so squelch the warning.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
"format" is the name of a parameter of the function we are wrapping, so we
shouldn't change it.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
We know that our code is correct and column should always be assigned, but it
never hurts to act defensively and guard against bugs in other pieces of the
code (or other components like GTK).
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
Caught by pylint. I wonder if we need this piece of code as nobody every
triggered it.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
This avoids the overhead from the string formatting on production systems.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
logging.exception() handles exceptions nicely for us, no need to explicitly
use traceback.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
Adapt to upstream format change.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
Tomeu prefers ' for strings, so let's use it wherever we don't have a good
reason to use ".
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
Most of the code uses """, so adjust the few deviations.
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
pep8 wants inline comments to be prefixed by at least two spaces. Let's just
move them to a separate line as that's easier to read anyway.
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
Caught by PEP8. This is important for Sugar because the XO has a small screen
where long lines would make the code hard to understand (because you need to
constantly scroll horizontally).
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer<simon@schampijer.de>
CC: Aleksey Lim <alsroot@member.fsf.org>
- add class NormalizedVersion to parse and compare the new activity versions
- change the bundlebuilder and activitybundle to use the new scheme, instead
of an int version we expect a string that matches the format defined in
NormalizedVersion
* sugar/presence/presenceservice.py: Specify the D-Bus interface when
calling ActivityProperties.GetActivity
* sugar/activity/main.py: Set a default for the --invite option and
make the create() D-Bus method accept a{sv} so we can pass the
boolean value.
When activities are uninstalled, profile data persists. Profile
data can consume a lot of storage space. Therefore it is necessary
to delete it when required.
Signed-off-by: Martin Abente <mabente@paraguayeduca.org>