diff options
author | Manuel Quiñones <manuq@laptop.org> | 2012-12-15 19:59:00 (GMT) |
---|---|---|
committer | Manuel Quiñones <manuq@laptop.org> | 2012-12-17 21:23:10 (GMT) |
commit | b6152b023af22fa28e8a64d400b9496602dab959 (patch) | |
tree | 669745930dcd358d69863213088d5b7267805ba6 | |
parent | 0231969bbad716361b01f4235f0bcae8f0151b28 (diff) |
ActivityBundle: don't wrap the temporal icon path in a TempFilePath - SL #4276
In the Journal, CellRendererActivityIcon is calling its do_render
method after the temporal file is removed. This is because we wrap
the icon path in a TempFilePath to control its deletion, but as we
don't maintain any reference to it, its __del__ method deletes the
temporal file.
Note that returning the path directly has one disadventage: the
temporal file is left in /tmp .
As a comment in the get_icon method of ActivityBundle say, ideally we
should return the icon data. But that implies a major change in the
Journal model and views, and in the CellRendererIcon class.
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r-- | src/sugar3/bundle/activitybundle.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sugar3/bundle/activitybundle.py b/src/sugar3/bundle/activitybundle.py index 3895673..53c9da6 100644 --- a/src/sugar3/bundle/activitybundle.py +++ b/src/sugar3/bundle/activitybundle.py @@ -213,7 +213,7 @@ class ActivityBundle(Bundle): suffix='.svg') os.write(temp_file, icon_data) os.close(temp_file) - return util.TempFilePath(temp_file_path) + return temp_file_path def get_activity_version(self): """Get the activity version""" |