diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-08-31 17:57:45 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-08-31 17:57:45 (GMT) |
commit | 0e60f07dd2bf08f2068a0f4b0516a96cff9cf4b7 (patch) | |
tree | ebb394e311de803175ff8d8c1e49a5a1389955c9 /sugar | |
parent | 00ec48f21447205445aa2a34d31093a969cc549a (diff) |
Save the temp file for the icon with the svg suffix so Icon will recognize it as a svg.
Diffstat (limited to 'sugar')
-rw-r--r-- | sugar/activity/bundle.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sugar/activity/bundle.py b/sugar/activity/bundle.py index d361c62..8bf3386 100644 --- a/sugar/activity/bundle.py +++ b/sugar/activity/bundle.py @@ -219,11 +219,9 @@ class Bundle: file_names = zip_file.namelist() root_dir = self._get_bundle_root_dir(file_names) icon_path = os.path.join(root_dir, 'activity', self._icon + '.svg') - print icon_path - print file_names if icon_path in file_names: icon_data = zip_file.read(icon_path) - temp_file, temp_file_path = tempfile.mkstemp(self._icon) + temp_file, temp_file_path = tempfile.mkstemp(suffix='.svg', prefix=self._icon) os.write(temp_file, icon_data) os.close(temp_file) return temp_file_path |